Quantcast

Schema validation: Saxon fails to detect an error in the schema

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Schema validation: Saxon fails to detect an error in the schema

Costello, Roger L.
Hi Michael,

Saxon should throw an error on the below schema, but it does not. See George's post on the xmlschema-dev list for more details.  /Roger

----------------------------------------------------------------------------------
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
   
    <xs:element name="A" type="xs:double" />
    <xs:element name="B" substitutionGroup="A" type="xs:double" />
   
    <xs:complexType name="base">
        <xs:sequence>
            <xs:element ref="A" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>
   
    <xs:complexType name="derived">
        <xs:complexContent>
            <xs:restriction base="base">
                <xs:sequence>
                    <xs:element ref="B" minOccurs="0" />
                </xs:sequence>
            </xs:restriction>
        </xs:complexContent>
    </xs:complexType>
</xs:schema>

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Schema validation: Saxon fails to detect an error in the schema

Michael Kay
See bullet 3 on this page of the documentation:

http://www.saxonica.com/documentation/index.html#!conformance/schema

Michael Kay
Saxonica

> On 25 Feb 2016, at 18:25, Costello, Roger L. <[hidden email]> wrote:
>
> Hi Michael,
>
> Saxon should throw an error on the below schema, but it does not. See George's post on the xmlschema-dev list for more details.  /Roger
>
> ----------------------------------------------------------------------------------
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
>
>    <xs:element name="A" type="xs:double" />
>    <xs:element name="B" substitutionGroup="A" type="xs:double" />
>
>    <xs:complexType name="base">
>        <xs:sequence>
>            <xs:element ref="A" minOccurs="0" maxOccurs="unbounded" />
>        </xs:sequence>
>    </xs:complexType>
>
>    <xs:complexType name="derived">
>        <xs:complexContent>
>            <xs:restriction base="base">
>                <xs:sequence>
>                    <xs:element ref="B" minOccurs="0" />
>                </xs:sequence>
>            </xs:restriction>
>        </xs:complexContent>
>    </xs:complexType>
> </xs:schema>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help 



------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Loading...