[ https://issues.apache.org/jira/browse/XERCESJ-1435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854713#action_12854713 ]
Kun Xu commented on XERCESJ-1435: --------------------------------- Hi Khaled, Yes, you are right. Because NaN ≠ NaN, including NaN in an enumeration does not have the effect of accepting NaNs as instances of the enumerated type. Thanks. Kun > XML Schema 1.1: support special value (NaN) for precisionDecimal in > enumeration > -------------------------------------------------------------------------------- > > Key: XERCESJ-1435 > URL: https://issues.apache.org/jira/browse/XERCESJ-1435 > Project: Xerces2-J > Issue Type: Improvement > Components: XML Schema 1.1 Datatypes > Affects Versions: 2.9.1 > Reporter: Kun Xu > Assignee: Khaled Noaman > Priority: Minor > Attachments: XSSimpleTypeDecl_patch.txt > > > schema doesn't support NaN in enumeration for precisionDecimal. > example: > XSD > <?xml version="1.0"?> > <schema xmlns="http://www.w3.org/2001/XMLSchema" > targetNamespace="http://www.schemaTest.org/schema11" > xmlns:sv="http://www.schemaTest.org/schema11"> > <simpleType name="pSpecial"> > <restriction base="precisionDecimal"> > <enumeration value="INF"/> > <enumeration value="NaN"/> > </restriction> > </simpleType> > <element name="root"> > <complexType> > <sequence> > <element name="Special1" type="sv:pSpecial" > minOccurs="1" maxOccurs="unbounded"/> > </sequence> > </complexType> > </element> > </schema> > XML > <?xml version="1.0" encoding="UTF-8"?> > <dv:root xmlns:dv="http://www.schemaTest.org/schema11" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.schemaTest.org/schema11 > test_NAN.xsd"> > <Special1>NaN</Special1> > <Special1>INF</Special1> > </dv:root> > suggestion: > simply add one condition when verify enumeration members. Please verify the > patch. Thanks. -- 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: j-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: j-dev-h...@xerces.apache.org