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 2022/05/03 08:03:00 UTC

[jira] [Updated] (XERCESJ-1743) XSD simpleType enumeration values must satisfy base type assertions, by only analyzing an XSD schema

     [ https://issues.apache.org/jira/browse/XERCESJ-1743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mukul Gandhi updated XERCESJ-1743:
----------------------------------
    Fix Version/s: 2.12.3

> XSD simpleType enumeration values must satisfy base type assertions, by only analyzing an XSD schema
> ----------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1743
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1743
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema 1.1 Datatypes, XML Schema 1.1 Structures
>    Affects Versions: 2.12.2
>            Reporter: Mukul Gandhi
>            Assignee: Mukul Gandhi
>            Priority: Major
>             Fix For: 2.12.3
>
>
> Please consider following XSD 1.1 document,
> <?xml version="1.0"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
>     
>     <xs:element name="color">
>        <xs:simpleType>
>           <xs:restriction base="Color">
>              <xs:enumeration value="a"/>
>              <xs:enumeration value="b"/>
>              <xs:enumeration value="c"/>
>           </xs:restriction>
>        </xs:simpleType>
>     </xs:element>
>     
>     <xs:simpleType name="Color">
>        <xs:restriction base="xs:string">
>           <xs:assertion test="matches($value, '^(red|green|blue|yellow)$')"/>
>        </xs:restriction>
>     </xs:simpleType>
> </xs:schema>
> The above XSD document should be invalid, because simpleType enumeration value(s) don't satisfy base type assertion facet. This invalidity assessment, must be detected while analyzing an XSD schema (i.e, when building the XSD schema component model).
> Currently, XercesJ XSD 1.1 validator is not able to do this.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

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