You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2003/11/25 22:40:39 UTC
DO NOT REPLY [Bug 24992] New: -
XInclude bug on included xml that its own schema and no DTD
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24992>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24992
XInclude bug on included xml that its own schema and no DTD
Summary: XInclude bug on included xml that its own schema and no
DTD
Product: Xerces2-J
Version: 2.6.0
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: Major
Priority: Other
Component: Other
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: donbate@iadfw.net
I get the following error message under both the 2.5.0 and 2.6.0 releases using
XInclude. The included file (pmtext) has its own schema in its own namespace but
no DTD. The including file also has its own schema and no DTD. The including
file's schema imports the included file's schema.
==================
LowLevelErrorHandler: error
domain=[http://www.w3.org/TR/1998/REC-xml-19980210] key=[MSG_GRAMMAR_NOT_FOUND]
::urn:com:streamvantage:pmtext:urn:com:streamvantage:pmtext:urn:com:streamvantage:pmtext:3:19:Document
is invalid: no grammar found.
==================
==================
LowLevelErrorHandler: error
domain=[http://www.w3.org/TR/1998/REC-xml-19980210]
key=[RootElementTypeMustMatchDoctypedecl]
::urn:com:streamvantage:pmtext:urn:com:streamvantage:pmtext:urn:com:streamvantage:pmtext:3:19:Document
root element "pm:pmDescriptions", must match DOCTYPE root "null".
==================
I ran it under a debugger and the messages are generated in
XMLNSDocumentScannerImpl.scanStartElement() at the start of the included file.
fPerformValidation is false for the including document but becomes true for the
included document. My guess is that somehow the DTD validator is turned back on.
Under 2.5.0, I simply commented out the fPerformValidation check and everything
worked correctly. However, under 2.6.0 I get a null pointer exception at the
following because parentBaseURI is null:
ava.lang.NullPointerException
at
org.apache.xerces.xinclude.XIncludeHandler.sameBaseURIAsIncludeParent(XIncludeHandler.java:1299)
at
org.apache.xerces.xinclude.XIncludeHandler.processAttributes(XIncludeHandler.java:1377)
at
org.apache.xerces.xinclude.XIncludeHandler.startElement(XIncludeHandler.java:621)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:321)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(XMLNSDocumentScannerImpl.java:617)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentS%239B119.java:1617)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentS%239B119.java:338)
at
org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:827)
at
org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:757)
at
org.apache.xerces.xinclude.XIncludeHandler.handleIncludeElement(XIncludeHandler.java:1173)
at
org.apache.xerces.xinclude.XIncludeHandler.emptyElement(XIncludeHandler.java:638)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:313)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentS%239B119.java:1549)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentS%239B119.java:338)
at
org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:827)
at
org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:757)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:148)
at
com.streamvantage.BaseUtilities.Alarm.parseAlarmDescriptions(Alarm.java:111)
at com.streamvantage.BaseUtilities.Alarm.initialize(Alarm.java:68)
at Test.main(Test.java:10)
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org