You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Alberto Massari (JIRA)" <xe...@xml.apache.org> on 2006/09/22 19:41:23 UTC

[jira] Commented: (XERCESC-1281) Validation by restriction doesn't take into account substitution groups

    [ http://issues.apache.org/jira/browse/XERCESC-1281?page=comments#action_12436939 ] 
            
Alberto Massari commented on XERCESC-1281:
------------------------------------------

I would like to commit your recommended changes, but need you to answer these 5 questions before I can do so:

a) Name and employer 

b) Are you the author of the code being contributed? 

c) Do you have the right to grant the copyright and patent licenses for the contribution that are set forth in the ASF v.2.0 license (http://www.apache.org/licenses/LICENSE-2.0)? 

d) Does your employer have any rights to code that you have written, for example, through your contract for employment? If so, has your employer given you permission to contribute the code on its behalf or waived its rights in the code? 

e) Are you aware of any third-party licenses or other restrictions (such as related patents or trademarks) that could apply to your contribution? If so, what are they? 

Thanks!


> Validation by restriction doesn't take into account substitution groups
> -----------------------------------------------------------------------
>
>                 Key: XERCESC-1281
>                 URL: http://issues.apache.org/jira/browse/XERCESC-1281
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>    Affects Versions: 2.5.0
>         Environment: Windows XP, Visual C++ 6.0
>            Reporter: Alberto Massari
>         Attachments: restrictionTest.xsd, rT.xml, subst-group-in-restriction.patch
>
>
> Running SaxCount -n -f -s rT.xml shows the following errors:
> Error at file c:\testcase\schema-restriction/restrictionTest.xsd, line 42, char 30
>   Message: Recurse: There is not a complete functional mapping between the particles
> Error at file c:\testcase\schema-restriction/restrictionTest.xsd, line 63, char 30
>   Message: Forbidden restriction of 'choice': All,Seq,Leaf
> The first error is caused by a restriction of A1_Type, replacing a sequence of O1 with a sequence of O2, O2 being in the substitution group of O1.
> The second error is caused by a restriction of B1_Type, replacing a sequence of O1 with a sequence of a choice of O2. Here Xerces complains that a choice should not be matched against a single element; but if Xerces had implemented this rule from the spec (ยง 3.9.6 "Constraints on Particle Schema Components", section "Schema Component Constraint: Particle Valid (Restriction)", point 2.1 "Any top-level element declaration particle (in R or B) which is the {substitution group affiliation} of one or more other element declarations and whose - substitution group-  contains at least one element declaration other than itself is treated as if it were a choice group whose {min occurs} and {max occurs} are those of the particle, and whose {particles} consists of one particle with {min occurs} and {max occurs} of 1 for each of the declarations in its - substitution group- ") the sequence of O1 would have been replaced with a sequence of a choice between O1 and O2, and this would have matched this choice with the one in the B2_Type declaration.
> Alberto

-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

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