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 "John Snelson (JIRA)" <xe...@xml.apache.org> on 2006/12/04 16:44:22 UTC
[jira] Created: (XERCESC-1655) Incorrect UPA violation error with
xs:any and ##other
Incorrect UPA violation error with xs:any and ##other
-----------------------------------------------------
Key: XERCESC-1655
URL: http://issues.apache.org/jira/browse/XERCESC-1655
Project: Xerces-C++
Issue Type: Bug
Components: Validating Parser (Schema) (Xerces 1.5 or up only)
Affects Versions: 2.7.0
Reporter: John Snelson
We are seeing a Unique Particle Attribution violation error occur on a schema which I am sure shouldn't have this problem. The error is:
Parse error in document at line, 1, char 417. Parser message: Complex type 'dataType' violates the Unique Particle Attribution rule in its components '##other' and 'data'
The schema that causes this is:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit">
<xs:element name="data" type="dataType"/>
<xs:complexType name="dataType">
<xs:sequence>
<xs:choice>
<xs:any namespace="##other" processContents="lax"/>
<xs:element name="data" type="xs:string"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:schema>
The instance document that causes this:
<?xml version="1.0" encoding="UTF-8"?>
<da:data xmlns:da="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bl="blah"
xsi:schemaLocation="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit
D:/Data/eclipse/workspace/GDFRPrototype/xml/xsd/iwsaDeposit-2_TEST.xsd
info:rfa/rfaRegistry/xmlSchemas/adminData
D:/Data/eclipse/workspace/GDFRPrototype/xml/xsd/adminData.xsd">
<bl:other>Things</bl:other>
</da:data>
My understanding of W3C XML Schema is that the "##other" should not overlap with the element declared in the schema's target namespace, and that therefore this schema does not violate the UPA rule.
--
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
[jira] Commented: (XERCESC-1655) Incorrect UPA violation error with
xs:any and ##other
Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESC-1655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471469 ]
Boris Kolpackov commented on XERCESC-1655:
------------------------------------------
No, element 'data' is not in the target namespace. It is unqualified and therefore is not in any namespace at all. In order for ##other being useful most XML Schema processor vendors adopted the second interpretation. Otherwise the whole mechanism is pretty much unusable in vocabularis that use unqualified local elements.
Boris
> Incorrect UPA violation error with xs:any and ##other
> -----------------------------------------------------
>
> Key: XERCESC-1655
> URL: https://issues.apache.org/jira/browse/XERCESC-1655
> Project: Xerces-C++
> Issue Type: Bug
> Components: Validating Parser (Schema) (Xerces 1.5 or up only)
> Affects Versions: 2.7.0
> Reporter: John Snelson
>
> We are seeing a Unique Particle Attribution violation error occur on a schema which I am sure shouldn't have this problem. The error is:
> Parse error in document at line, 1, char 417. Parser message: Complex type 'dataType' violates the Unique Particle Attribution rule in its components '##other' and 'data'
> The schema that causes this is:
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema targetNamespace="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit">
> <xs:element name="data" type="dataType"/>
> <xs:complexType name="dataType">
> <xs:sequence>
> <xs:choice>
> <xs:any namespace="##other" processContents="lax"/>
> <xs:element name="data" type="xs:string"/>
> </xs:choice>
> </xs:sequence>
> </xs:complexType>
> </xs:schema>
> The instance document that causes this:
> <?xml version="1.0" encoding="UTF-8"?>
> <da:data xmlns:da="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:bl="blah"
> xsi:schemaLocation="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit
> D:/Data/eclipse/workspace/GDFRPrototype/xml/xsd/iwsaDeposit-2_TEST.xsd
> info:rfa/rfaRegistry/xmlSchemas/adminData
> D:/Data/eclipse/workspace/GDFRPrototype/xml/xsd/adminData.xsd">
> <bl:other>Things</bl:other>
> </da:data>
> My understanding of W3C XML Schema is that the "##other" should not overlap with the element declared in the schema's target namespace, and that therefore this schema does not violate the UPA rule.
--
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
[jira] Commented: (XERCESC-1655) Incorrect UPA violation error with
xs:any and ##other
Posted by "Brian J. Clark (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESC-1655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471385 ]
Brian J. Clark commented on XERCESC-1655:
-----------------------------------------
I really don't see why this is "tricky". namespace="##other" means any namespace besides the target namespace, correct? The element "data" is part of the targetNamespace, by default. It is not unqualified.
Either way, if xs:any namespace="##other" gives an error, how is xs:any supposed to be used?
> Incorrect UPA violation error with xs:any and ##other
> -----------------------------------------------------
>
> Key: XERCESC-1655
> URL: https://issues.apache.org/jira/browse/XERCESC-1655
> Project: Xerces-C++
> Issue Type: Bug
> Components: Validating Parser (Schema) (Xerces 1.5 or up only)
> Affects Versions: 2.7.0
> Reporter: John Snelson
>
> We are seeing a Unique Particle Attribution violation error occur on a schema which I am sure shouldn't have this problem. The error is:
> Parse error in document at line, 1, char 417. Parser message: Complex type 'dataType' violates the Unique Particle Attribution rule in its components '##other' and 'data'
> The schema that causes this is:
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema targetNamespace="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit">
> <xs:element name="data" type="dataType"/>
> <xs:complexType name="dataType">
> <xs:sequence>
> <xs:choice>
> <xs:any namespace="##other" processContents="lax"/>
> <xs:element name="data" type="xs:string"/>
> </xs:choice>
> </xs:sequence>
> </xs:complexType>
> </xs:schema>
> The instance document that causes this:
> <?xml version="1.0" encoding="UTF-8"?>
> <da:data xmlns:da="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:bl="blah"
> xsi:schemaLocation="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit
> D:/Data/eclipse/workspace/GDFRPrototype/xml/xsd/iwsaDeposit-2_TEST.xsd
> info:rfa/rfaRegistry/xmlSchemas/adminData
> D:/Data/eclipse/workspace/GDFRPrototype/xml/xsd/adminData.xsd">
> <bl:other>Things</bl:other>
> </da:data>
> My understanding of W3C XML Schema is that the "##other" should not overlap with the element declared in the schema's target namespace, and that therefore this schema does not violate the UPA rule.
--
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
[jira] Closed: (XERCESC-1655) Incorrect UPA violation error with
xs:any and ##other
Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESC-1655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Boris Kolpackov closed XERCESC-1655.
------------------------------------
Resolution: Fixed
Fix Version/s: 2.9.0
3.0.0
Assignee: Boris Kolpackov
Fix is in SVN.
> Incorrect UPA violation error with xs:any and ##other
> -----------------------------------------------------
>
> Key: XERCESC-1655
> URL: https://issues.apache.org/jira/browse/XERCESC-1655
> Project: Xerces-C++
> Issue Type: Bug
> Components: Validating Parser (XML Schema)
> Affects Versions: 2.7.0
> Reporter: John Snelson
> Assignee: Boris Kolpackov
> Fix For: 3.0.0, 2.9.0
>
>
> We are seeing a Unique Particle Attribution violation error occur on a schema which I am sure shouldn't have this problem. The error is:
> Parse error in document at line, 1, char 417. Parser message: Complex type 'dataType' violates the Unique Particle Attribution rule in its components '##other' and 'data'
> The schema that causes this is:
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema targetNamespace="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit">
> <xs:element name="data" type="dataType"/>
> <xs:complexType name="dataType">
> <xs:sequence>
> <xs:choice>
> <xs:any namespace="##other" processContents="lax"/>
> <xs:element name="data" type="xs:string"/>
> </xs:choice>
> </xs:sequence>
> </xs:complexType>
> </xs:schema>
> The instance document that causes this:
> <?xml version="1.0" encoding="UTF-8"?>
> <da:data xmlns:da="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:bl="blah"
> xsi:schemaLocation="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit
> D:/Data/eclipse/workspace/GDFRPrototype/xml/xsd/iwsaDeposit-2_TEST.xsd
> info:rfa/rfaRegistry/xmlSchemas/adminData
> D:/Data/eclipse/workspace/GDFRPrototype/xml/xsd/adminData.xsd">
> <bl:other>Things</bl:other>
> </da:data>
> My understanding of W3C XML Schema is that the "##other" should not overlap with the element declared in the schema's target namespace, and that therefore this schema does not violate the UPA rule.
--
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
[jira] Commented: (XERCESC-1655) Incorrect UPA violation error with
xs:any and ##other
Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XERCESC-1655?page=comments#action_12455702 ]
Boris Kolpackov commented on XERCESC-1655:
------------------------------------------
This is a bit tricky. Your 'data' element inside dataType is not in the schema's targetNamespace, it is not in a namespace at all (unqualified). So it boils down to the interpretation of ##other. My understanding is that the spec says ##other means any element that is not in targetNamespace. By this definition your 'data' matches and you've got UPA. Howeve, it seem that the consensus between XML Schema processor vendors is to interpret ##other as "in a namespace but not in targetNamespace". By this definition your 'data' does not match and there is no UPA. Most of the schema processors use the second definition so your schema will be reported as valid by them. I wonder if there are plans to move to the "consensus interpretation" in Xerces-C++.
> Incorrect UPA violation error with xs:any and ##other
> -----------------------------------------------------
>
> Key: XERCESC-1655
> URL: http://issues.apache.org/jira/browse/XERCESC-1655
> Project: Xerces-C++
> Issue Type: Bug
> Components: Validating Parser (Schema) (Xerces 1.5 or up only)
> Affects Versions: 2.7.0
> Reporter: John Snelson
>
> We are seeing a Unique Particle Attribution violation error occur on a schema which I am sure shouldn't have this problem. The error is:
> Parse error in document at line, 1, char 417. Parser message: Complex type 'dataType' violates the Unique Particle Attribution rule in its components '##other' and 'data'
> The schema that causes this is:
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema targetNamespace="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit">
> <xs:element name="data" type="dataType"/>
> <xs:complexType name="dataType">
> <xs:sequence>
> <xs:choice>
> <xs:any namespace="##other" processContents="lax"/>
> <xs:element name="data" type="xs:string"/>
> </xs:choice>
> </xs:sequence>
> </xs:complexType>
> </xs:schema>
> The instance document that causes this:
> <?xml version="1.0" encoding="UTF-8"?>
> <da:data xmlns:da="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:bl="blah"
> xsi:schemaLocation="info:rfa/rfaRegistry/xmlSchemas/iwsaDeposit
> D:/Data/eclipse/workspace/GDFRPrototype/xml/xsd/iwsaDeposit-2_TEST.xsd
> info:rfa/rfaRegistry/xmlSchemas/adminData
> D:/Data/eclipse/workspace/GDFRPrototype/xml/xsd/adminData.xsd">
> <bl:other>Things</bl:other>
> </da:data>
> My understanding of W3C XML Schema is that the "##other" should not overlap with the element declared in the schema's target namespace, and that therefore this schema does not violate the UPA rule.
--
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