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 2007/02/21 09:19:05 UTC
[jira] Closed: (XERCESC-1633) Using 'list' or 'union' for
finalDefault in schema element causes incorrect validation errors
[ https://issues.apache.org/jira/browse/XERCESC-1633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alberto Massari closed XERCESC-1633.
------------------------------------
Assignee: Alberto Massari
> Using 'list' or 'union' for finalDefault in schema element causes incorrect validation errors
> ---------------------------------------------------------------------------------------------
>
> Key: XERCESC-1633
> URL: https://issues.apache.org/jira/browse/XERCESC-1633
> Project: Xerces-C++
> Issue Type: Bug
> Components: Validating Parser (Schema) (Xerces 1.5 or up only)
> Affects Versions: 2.6.0
> Environment: Testing on Windows XP
> Reporter: Jennifer Rapp
> Assigned To: Alberto Massari
> Priority: Critical
>
> I am trying to test parsing using 'list' or 'union' for finalDefault and I'm getting parsing errors from the validation parser for a valid schema:
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://www.quovadx.com/schema_test"
> xmlns:st="http://www.quovadx.com/schema_test"
> finalDefault="list union"
> >
> <xs:element name="root">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="gst0" type="st:gst_explicit_none"></xs:element>
> <xs:element name="gst1" type="st:gst_none"></xs:element>
> <xs:element name="gst2" type="st:gst_r"></xs:element>
> <xs:element name="gst3" type="st:gst_u"></xs:element>
> <xs:element name="gst4" type="st:gst_rl"></xs:element>
> <xs:element name="gst5" type="st:gst_ru"></xs:element>
> <xs:element name="gst6" type="st:gst_lu"></xs:element>
> <xs:element name="gst7" type="st:gst_rlu"></xs:element>
> <xs:element name="gst8" type="st:gst_all"></xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
>
> <xs:simpleType name="gst_explicit_none" final=""><xs:union memberTypes="xs:int"></xs:union></xs:simpleType>
> <xs:simpleType name="gst_none"><xs:union memberTypes="xs:int"></xs:union></xs:simpleType>
> <xs:simpleType name="gst_r" final="restriction"><xs:union memberTypes="xs:int"></xs:union></xs:simpleType>
> <xs:simpleType name="gst_l" final="list"><xs:union memberTypes="xs:int"></xs:union></xs:simpleType>
> <xs:simpleType name="gst_u" final="union"><xs:union memberTypes="xs:int"></xs:union></xs:simpleType>
> <xs:simpleType name="gst_rl" final="restriction list"><xs:union memberTypes="xs:int"></xs:union></xs:simpleType>
> <xs:simpleType name="gst_ru" final="restriction union"><xs:union memberTypes="xs:int"></xs:union></xs:simpleType>
> <xs:simpleType name="gst_lu" final="list union"><xs:union memberTypes="xs:int"></xs:union></xs:simpleType>
> <xs:simpleType name="gst_rlu" final="restriction list union"><xs:union memberTypes="xs:int"></xs:union></xs:simpleType>
> <xs:simpleType name="gst_all" final="#all"><xs:union memberTypes="xs:int"></xs:union></xs:simpleType>
> </xs:schema>
> And the following xml instance
> <?xml version="1.0" encoding="UTF-8"?>
> <st:root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.quovadx.com/schema_test schema_test.xsd"
> xmlns:st="http://www.quovadx.com/schema_test">
> <gst0>1</gst0>
> <gst1>2</gst1>
> <gst2>3</gst2>
> <gst3>4</gst3>
> <gst4>5</gst4>
> <gst5>6</gst5>
> <gst6>7</gst6>
> <gst7>8</gst7>
> <gst8>9</gst8>
> </st:root>
> Produces the following errors running PParse:
> Error at file C:\CurrentProject\5.5\AR\10237\Xerces_bug\schema_test.xsd, line 7,
> char 6
> Message: Invalid final value: list union
> Error at file C:\CurrentProject\5.5\AR\10237\Xerces_bug\schema_test.xsd, line 7,
> char 6
> Message: Invalid final value: list union
> I believe the issue is with the validation. Currently 'list' and 'schema' are only allowed for simpleType definitions, but should be allowed in the schema's finalDefault attribute as well.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org