xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alberto Massari (JIRA)" <xerces-c-...@xml.apache.org>
Subject [jira] Resolved: (XERCESC-1707) Processing of not-declared-element with "xsi:type" under anyType element does not clear SchemaValidator::fXsiType
Date Fri, 14 Aug 2009 13:45:14 GMT

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

Alberto Massari resolved XERCESC-1707.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 3.1.0
         Assignee: Alberto Massari

A fix is in SVN

> Processing of not-declared-element with "xsi:type" under anyType element does not clear
SchemaValidator::fXsiType
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: XERCESC-1707
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1707
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Validating Parser (XML Schema)
>    Affects Versions: 2.6.0, 2.7.0
>            Reporter: Alexey Miroshnichenko
>            Assignee: Alberto Massari
>             Fix For: 3.1.0
>
>         Attachments: XsiType.diff
>
>
> input.xml
> =================
> <?xml version="1.0" encoding="UTF-8"?>
> <purchaseOrder xmlns="http://www.openuri.org/mySchema" 
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>     xsi:schemaLocation="http://www.openuri.org/mySchema xsd.xsd">
> 	<shipTo>
> 		<name>ship-to-name</name>
> 		<element_of_any_type>
> 			<unknown_element xsi:type="USState">AK</unknown_element>
> 		</element_of_any_type>
> 	</shipTo>
> 	<billTo>
> 		<name>bill-to-name</name>
> 		<element_of_any_type/>
> 	</billTo>
> </purchaseOrder>
> =================
> xsd.xsd
> =================
> <?xml version="1.0"?>
> <xsd:schema xmlns="http://www.openuri.org/mySchema" 
>             elementFormDefault="qualified" 
>             targetNamespace="http://www.openuri.org/mySchema"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>             >
>   <xsd:element name="purchaseOrder" type="PurchaseOrderType" />
>   <xsd:complexType name="PurchaseOrderType">
>     <xsd:sequence>
>       <xsd:element name="shipTo" type="USAddress" />
>       <xsd:element name="billTo" type="USAddress" />
>     </xsd:sequence>
>   </xsd:complexType>
>   <xsd:complexType name="USAddress">
>     <xsd:sequence>
>       <xsd:element name="name" type="xsd:string" />
>       <xsd:element name="element_of_any_type"/>
>     </xsd:sequence>
> 	<!-- declaration of this attribute is necesary to reproduce -->
>     <xsd:attribute fixed="US" name="country" type="xsd:NMTOKEN" />
>   </xsd:complexType>
>   <xsd:simpleType name="USState">
> 	<xsd:restriction base="xsd:string">
> 		<xsd:enumeration value="AK"/>
> 		<xsd:enumeration value="AL"/>
> 	</xsd:restriction>
>   </xsd:simpleType>
> </xsd:schema>
> =================
> Validation of input.xml reports follow error:
> Error at file input.xml, line 11, char 10
>   Message: Type 'USState' that is used in xsi:type is not derived from the type of element
'billTo'
> reason for this behavior is that SchemaValidator::fXsiType is not cleared after element
"unknown_element" processing.

-- 
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


Mime
View raw message