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 ji...@apache.org on 2004/04/12 23:26:02 UTC
[jira] Updated: (XERCERJ-426) xs:keyref within xs:key scope fails with NullPointerException. Inverse always validates.
The following issue has been updated:
Updater: Serge Knystautas (mailto:sergek@lokitech.com)
Date: Mon, 12 Apr 2004 2:24 PM
Changes:
Attachment changed from Example.xml
---------------------------------------------------------------------
For a full history of the issue, see:
http://issues.apache.org/jira/browse/XERCERJ-426?page=history
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/XERCERJ-426
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XERCERJ-426
Summary: xs:keyref within xs:key scope fails with NullPointerException. Inverse always validates.
Type: Bug
Status: Resolved
Resolution: FIXED
Project: Xerces2-J
Assignee: Xerces-J Developers Mailing List
Reporter: Nicholas Pace
Created: Thu, 8 Aug 2002 9:14 PM
Updated: Mon, 12 Apr 2004 2:24 PM
Environment: Operating System: Windows XP
Platform: PC
Description:
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)
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org