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

Mukul Gandhi resolved XERCESJ-1468.
-----------------------------------

    Resolution: Fixed

did a commit for this issue with the fixes, few minutes ago. i'm therefore 
marking this issue as fixed.

> XML Schema 1.1 assertion evaluations on complexType with simpleContent 
> require few improvements
> -----------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1468
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1468
>             Project: Xerces2-J
>          Issue Type: Improvement
>          Components: XML Schema 1.1 Structures
>    Affects Versions: 2.10.0
>            Reporter: Mukul Gandhi
>            Assignee: Mukul Gandhi
>             Fix For: 2.11.0
>
>
> I'm opening this bug report for Xerces JIRA records and tracking.
> Here's an example which illustrates the problems highlighted in this bug 
> report. With this bug report, we are targeting improvements on current 
> code-base on SVN.
> XML document:
> <List>2 4 6</List>
> XML Schema 1.1 document:
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";>
>    
>    <xs:element name="List">
>          <xs:complexType>
>              <xs:simpleContent>
>                   <xs:extension base="INTLIST">
>                          <xs:assert test="data($value) instance of 
> xs:integer+" />
>                          <xs:assert test="count(data($value)) = 3" />
>                   </xs:extension>
>              </xs:simpleContent>
>         </xs:complexType>
>    </xs:element>
>    
>    <xs:simpleType name="INTLIST">
>        <xs:list itemType="xs:integer" />
>    </xs:simpleType>
> </xs:schema>
> The schema above must successfully validate (i.e the schema assertions 
> specified in the above example, must evaluate to true. The XPath 2.0 function 
> "data" gives us the 'typed value -- of XDM type xs:anyAtomicType*' of the 
> argument.) the XML document specified above.
> Per the relevant sections of the spec here, 
> http://www.w3.org/TR/xmlschema11-1/#sec-cvc-assertion, the point 2 at this 
> link says:
> <quote>
> For complex types with simple content, the element node may be referred to as 
> ".", while its content may be referred to as "$value". Since the element 
> node, as a consequence of clause 1.2, will normally have the type annotation 
> anyType, its atomized value will be a single atomic value of type 
> untypedAtomic. By contrast, $value will be a sequence of one or more atomic 
> values, whose types are the most specific (narrowest) built-in types 
> available.
> </quote>
> Presently (for the current code-base on Xerces SVN), for complexType with 
> simple contents, $value doesn't have a typed value of kind xs:anyAtomicType*. 
> With the current code-base on Xerces SVN, $value as per examples cited in 
> this bug report, is just a string "2 4 6". I believe, this is a bug as per 
> the XML Schema 1.1 spec.
> I'll try to solve this bug ASAP.

-- 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to