[
https://issues.apache.org/jira/browse/XERCESJ-1446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12860663#action_12860663
]
Karthik Sankaran commented on XERCESJ-1446:
-------------------------------------------
Thank you very much, Gentlemen, for your detailed comments and swift action!
Good luck.
Sincere thanks to Priscilla Walmsley for her responses on this issue outside
this forum.
One interesting observation: In fact, the value I originally typed into the
JIRA textbox for the element "dressSize" in step 5 and subsequently mentioned
in steps 6 and 7 was
'<space><space><space><space>medium<space><space><space><space>' i.e. four
leading and trailing whitespaces around the value 'medium'. I just noticed that
each of these groups of whitespaces have been collapsed into a single
whitespace!
> Whitespace processing in union of token and string based simple types
> ---------------------------------------------------------------------
>
> Key: XERCESJ-1446
> URL: https://issues.apache.org/jira/browse/XERCESJ-1446
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.0 Datatypes
> Affects Versions: 2.9.1
> Environment: OS: Win XP SP2
> SW: Eclipse platform running Oxygen XML plugin with default validation engine
> Xerces-J 2.9.1
> Reporter: Karthik Sankaran
> Assignee: Michael Glavassevich
> Priority: Minor
> Fix For: 2.10.0
>
> Attachments: dressSize.zip
>
>
> 1. "DressSizeType" is a xs:token based simple type with enumerated values
> "small" and "large":
> <xs:simpleType name="DressSizeType">
> <xs:restriction base="xs:token">
> <xs:enumeration value="small"/>
> <xs:enumeration value="large"/>
> </xs:restriction>
> </xs:simpleType>
> 2. "MDressSizeType" is a union type with the above "DressSizeType" as one of
> its member types and the other being a string based simple type:
> <xs:simpleType name="MDressSizeType">
> <xs:union memberTypes="DressSizeType">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:enumeration value="medium"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:union>
> </xs:simpleType>
> "MDressSizeType" is introduced mainly to add another enumeration value
> "medium" to the already existing "small" and "large" enumeration values.
> 3. An element "dressSize" is assigned the type "MDressSizeType"
> 4. "dressSize.xsd" is created from 1, 2, and 3. It looks like:
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:simpleType name="DressSizeType">
> <xs:restriction base="xs:token">
> <xs:enumeration value="small"/>
> <xs:enumeration value="large"/>
> </xs:restriction>
> </xs:simpleType>
>
> <xs:simpleType name="MDressSizeType">
> <xs:union memberTypes="DressSizeType">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:enumeration value="medium"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:union>
> </xs:simpleType>
> <xs:element name="dressSize" type="MDressSizeType"></xs:element>
> </xs:schema>
> 5. "dressSize.xml" is created and it looks like:
> <?xml version="1.0" encoding="UTF-8"?>
> <dressSize xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="dressSize.xsd"> medium </dressSize>
> 6. When 5 is validated, the value ' medium ' (with leading and
> trailing white-spaces) for the "dressSize" element was expected to be invalid
> as the enumeration "medium" is encapsulated within a string based simple type
> whose whitespace facet value is preserve.
> 7. But the validation engine accepts the value ' medium ' for
> "dressSize" element and informs that the document is valid.
> Kindly note: I have made the best possible attempt to scan all the other
> reported bugs under this component to avoid a duplicate entry. Apologies in
> case I missed out to spot it.
> Thanks very much in advance! Appreciate all your efforts...
--
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]