[jboss-dev-forums] [Design of JBossXB] - Re: problem parsing sip.xml with JBossXB
deruelle_jean
do-not-reply at jboss.com
Mon Jan 12 06:01:22 EST 2009
I see that on XmlSchema (http://java.sun.com/javaee/5/docs/api/javax/xml/bind/annotation/XmlSchema.html) we can customize namespace prefix and namespace URI mapping (Example 2 in the above link) and it seems that should do the job (not 100% sure though)
I was wondering if it was possible to do that on JBossXmlSchema annotation but it doesn't seem to work either...
How hard would it be to support this ?
Also not sure this is related at all but the 'namespace-prefixes' property for the SAXParser (http://www.saxproject.org/apidoc/org/xml/sax/package-summary.html#package_description) is not set to true, I wonder if that would be better when set to true ?
anonymous wrote : Because they are explicitly bound to javaee ns?
Indeed, that forces me to create different set of classes depending of whether or not we are unmarshalling a sip.xml that has namespace defined or not, so I'm kind of duplicating the classes which is a sign of code smell. Also it complicates the code of the deployer because I have to get both metadata and push them into a third set of classes (on which I can do the merge with annotations, jboss-web.xml metadata and web.xml metadata to avoid duplicating the merge operation too) since I cannot know in advance if the sip.xml will have namespace or not...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200939#4200939
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200939
More information about the jboss-dev-forums
mailing list