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 "Mukul Gandhi (Jira)" <xe...@xml.apache.org> on 2019/12/20 11:40:00 UTC

[jira] [Comment Edited] (XERCESJ-1585) Change in behavior when a keyref refers an out-of-scope unique or key

    [ https://issues.apache.org/jira/browse/XERCESJ-1585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17000836#comment-17000836 ] 

Mukul Gandhi edited comment on XERCESJ-1585 at 12/20/19 11:39 AM:
------------------------------------------------------------------

I've verified the XSD validation behavior of the sample posted in this bug report, using JDK 13's XSD 1.0 validator which doesn't lead to validation failure (i.e validation passes). The latest Xerces XSD 1.0 & 1.1 codebases, also don't produce a validation failure with the sample provided in this bug report.

Therefore, it is very likely that the issue suggested in this bug report, is not a Xerces bug but a correct run time behavior. I'm therefore resolving this bug as, 'Not a Bug'.

If anyone has concerns with this resolution of this bug report, this bug report may be reopened with supporting information for re-analysis.


was (Author: mukul_gandhi):
I've verified the XSD validation behavior of the sample posted in this bug report, using JDK 13's XSD 1.0 validator which doesn't lead to validation failure (i.e validation passes) with the validation sample provided in this bug report. The latest Xerces XSD 1.0 & 1.1 codebases, also don't produce a validation failure with the samples provided in this bug report.

Therefore, it is very likely that the issue suggested in this bug report, is not a Xerces bug but a correct run time behavior. I'm therefore resolving this bug as, 'Not a Bug'.

If anyone has concerns with this resolution of this bug report, this bug report may be reopened with supporting information for re-analysis.

> Change in behavior when a keyref refers an out-of-scope unique or key
> ---------------------------------------------------------------------
>
>                 Key: XERCESJ-1585
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1585
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema 1.0 Structures
>    Affects Versions: 2.11.0
>            Reporter: Radu Coravu
>            Assignee: Mukul Gandhi
>            Priority: Major
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> If I have the following XML:
> <?xml version="1.0" encoding="UTF-8"?>
> <Top xmlns="www.bla.com"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:schemaLocation="www.bla.com test.xsd">
>     <Sub_1>
>         <Sub_2/>
>         <Sub_2/>
>     </Sub_1>
>     <Sub_1a>
>         <Sub_2a/>
>     </Sub_1a>
> </Top>
> and validate it with the following XML Schema:
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
>     targetNamespace="www.bla.com" xmlns:ns="www.bla.com">
>     
>     <xs:element name="Top">
>         <xs:complexType>
>             <xs:sequence>
>                 <xs:element name="Sub_1">
>                     <xs:complexType>
>                         <xs:sequence>
>                             <xs:element maxOccurs="unbounded" name="Sub_2">
>                                 <xs:complexType>
>                                     <xs:attribute name="SubID" use="optional"/>
>                                 </xs:complexType>
>                             </xs:element>
>                         </xs:sequence>
>                     </xs:complexType>
>                     <xs:key name="newKey">
>                         <xs:selector xpath="Sub_2a"/>
>                         <xs:field xpath="@SubID"/>
>                     </xs:key>
>                 </xs:element>
>                 <xs:element name="Sub_1a">
>                     <xs:complexType>
>                         <xs:sequence>
>                             <xs:element name="Sub_2a">
>                                 <xs:complexType>
>                                     <xs:attribute name="SubIDPtr"/>
>                                 </xs:complexType>
>                             </xs:element>
>                         </xs:sequence>
>                     </xs:complexType>
>                     <xs:keyref name="newKeyref" refer="ns:newKey">
>                         <xs:selector xpath="Sub_2a"/>
>                         <xs:field xpath="SubIDPtr"/>
>                     </xs:keyref>
>                 </xs:element>
>             </xs:sequence>
>         </xs:complexType>
>     </xs:element>
> </xs:schema>
> In Xerces 2.9.0 the following error was reported:
> Identity Constraint error:  identity constraint "KeyRef@79ff89" has a keyref which refers to a key or unique that is out of scope. 
> @Line 11 Column 14
> In Xerces 2.11.0 (using the 'xerces-java-xml-schema-1.1-dev' branch) the sample is considered valid when validated either with XML Schema 1.0 or 1.1 support.
> Was there any functionality lost?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org