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=11571>.
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=11571

xs:keyref within xs:key scope fails with NullPointerException. Inverse always 
validates.

           Summary: xs:keyref within xs:key scope fails with
                    NullPointerException. Inverse always validates.
           Product: Xerces2-J
           Version: 2.0.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: XML Schema Structures
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


An excerpt from http://xml.apache.org/xerces2-j/xml-schema.html: "We have 
interpreted the specs as requiring <keyref> Identity Constraints to refer to 
<key> or <unique> identity constraints within the scope of the elements to 
which the <keyref> is attached. This interpretation is at variance with the 
Schema Primer, which contains an example with a <keyref> declared on an 
element used inside the element of its corresponding <key>"

When <key> does infact exist within the <keyref> the exception below is 
thrown. This exception is similar to the exception thrown with bug 7315. 
Conversely, when <key> is within <keyref>, validation is always true under all 
conditions.

One other problem, is the deviation of the Schema Primer. XMLSpy correctly 
validates <keyref> within <key>. In fact, XMLSpy has trouble with the inverse. 
My particular needs require both parsers to properly validate the schema. 
Please consider changing how Xerces interprets specs for <key> and <keyref>


Exception Encountered:

Exception in thread "main" java.lang.NullPointerException
at org.apache.xerces.impl.xs.XMLSchemaValidator$ValueStoreBase.append 
(XMLSchemaValidator.java:3218)
at org.apache.xerces.impl.xs.XMLSchemaValidator$ValueStoreCache.transplant
(XMLSchemaValidator.java:3761)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleEndElement
(XMLSchemaValidator.java:1976)
at org.apache.xerces.impl.xs.XMLSchemaValidator.endElement
(XMLSchemaValidator.java:694)
at org.apache.xerces.impl.XMLNamespaceBinder.handleEndElement
(XMLNamespaceBinder.java:853)
at org.apache.xerces.impl.XMLNamespaceBinder.endElement
(XMLNamespaceBinder.java:643)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement
(XMLDTDValidator.java:2978)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement
(XMLDTDValidator.java:918)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement
(XMLDocumentFragmentScannerImpl.java:11
45)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement
(XMLDocumentFragmentScannerImpl.java:988)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher
.dispatch(XMLDocumentFragmentS
cannerImpl.java:1446)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
(XMLDocumentFragmentScannerImpl.java:333)
at org.apache.xerces.parsers.StandardParserConfiguration.parse
(StandardParserConfiguration.java:529)
at org.apache.xerces.parsers.StandardParserConfiguration.parse
(StandardParserConfiguration.java:585)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:221)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse
(DocumentBuilderImpl.java:201)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:161)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to