This content has been marked as final.
Show 27 replies
-
15. Re: Is META-INF in the classpath?
alesj Jun 11, 2008 6:07 AM (in response to dimitris)"alex.loubyansky@jboss.com" wrote:
Maybe the namespace in the included.xml?
Like this?<jboss-test xmlns="urn:jboss:include:1.0">test2</jboss-test>
Then I get thisCaused by: org.jboss.xb.binding.JBossXBRuntimeException: Attribute is not bound: element owner {urn:jboss:include:1.0}jboss-test, attribute {http://www.w3.org/XML/1998/namespace}base at org.jboss.xb.binding.sunday.unmarshalling.AttributesHandler.attributes(AttributesHandler.java:58) at org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler.attributes(DefaultElementHandler.java:65) at org.jboss.xb.builder.runtime.BeanHandler.startParticle(BeanHandler.java:124) at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:632) at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:401) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.handleIncludeElement(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:199)
-
16. Re: Is META-INF in the classpath?
aloubyansky Jun 11, 2008 6:37 AM (in response to dimitris)That's clearly a step in the right direction. I haven't seen the exception before. The attribute should be ignored http://www.w3.org/TR/xmlbase/#syntax
Looks like another issue for XB. -
17. Re: Is META-INF in the classpath?
alesj Jun 11, 2008 6:39 AM (in response to dimitris)"alex.loubyansky@jboss.com" wrote:
Looks like another issue for XB.
:-(
I hope you haven't done CR10 yet. ;-)
Let me know when this will be in jbossxb trunk. -
18. Re: Is META-INF in the classpath?
alesj Jun 11, 2008 6:42 AM (in response to dimitris)"alex.loubyansky@jboss.com" wrote:
That's clearly a step in the right direction.
But I don't like that you have to explicitly add that namespace.
I would assume that xi:include should behave the same way as if you would have that piece of text directly written in the original - where you don't need extra namespace. -
19. Re: Is META-INF in the classpath?
aloubyansky Jun 11, 2008 6:42 AM (in response to dimitris)Actually, maybe not an XB issue. There two options: fix the schema to accept xml:base or set the feature on the parser to not "fixup" xml:base.
http://xerces.apache.org/xerces2-j/faq-xinclude.html
Can you try this feature?
http://xerces.apache.org/xerces2-j/features.html#xinclude.fixup-base-uris -
20. Re: Is META-INF in the classpath?
aloubyansky Jun 11, 2008 6:43 AM (in response to dimitris)"alesj" wrote:
"alex.loubyansky@jboss.com" wrote:
That's clearly a step in the right direction.
But I don't like that you have to explicitly add that namespace.
I would assume that xi:include should behave the same way as if you would have that piece of text directly written in the original - where you don't need extra namespace.
That's the XML/XSD rules. -
21. Re: Is META-INF in the classpath?
alesj Jun 11, 2008 6:51 AM (in response to dimitris)"alex.loubyansky@jboss.com" wrote:
Can you try this feature?
http://xerces.apache.org/xerces2-j/features.html#xinclude.fixup-base-uris
Nope, having this<xi:include fixup-base-uris="false" fixup-language="false" href="included.xml"/>
still results in same error as before. -
22. Re: Is META-INF in the classpath?
alesj Jun 11, 2008 7:00 AM (in response to dimitris)I can commit the test and let you play with it?
-
23. Re: Is META-INF in the classpath?
aloubyansky Jun 11, 2008 7:18 AM (in response to dimitris)Ok, commit it.
-
-
25. Re: Is META-INF in the classpath?
aloubyansky Jun 11, 2008 10:59 AM (in response to dimitris)This is how you should the feature on the parser
unmarshaller.setFeature("http://apache.org/xml/features/xinclude/fixup-base-uris", false);
The test fails assertion now. -
26. Re: Is META-INF in the classpath?
aloubyansky Jun 11, 2008 11:02 AM (in response to dimitris)Because name is the attribute, not a CDATA.
-
27. Re: Is META-INF in the classpath?
alesj Jun 12, 2008 7:18 AM (in response to dimitris)Features applied, xml fixed.
Test passes. :-)