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 "Alberto Massari (JIRA)" <xe...@xml.apache.org> on 2007/05/17 17:26:16 UTC

[jira] Resolved: (XERCESC-1638) inconsistent (incorrect?) whiteSpace handling for list type in Xerces version 2.7

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

Alberto Massari resolved XERCESC-1638.
--------------------------------------

    Resolution: Cannot Reproduce

Hi Frank,
I tried running these command lines

c:\xerces-c_2_7_0-windows_2000-msvc_60\bin> DOMPrint c:\testcase\xercesc-1638.xml
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xercesc-1638.xsd">

51 32 59

</test>

and 

c:\xerces-c_2_7_0-windows_2000-msvc_60\bin> DOMPrint -n -s c:\testcase\xercesc-1638.xml
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xercesc-1638.xsd">51 32 59</test>

Could you verify if by any chance your schema is not considered valid by Xerces (hence, ignored)? Could you attach your files?

Alberto


>   inconsistent (incorrect?) whiteSpace handling for list type in  Xerces version 2.7
> ------------------------------------------------------------------------------------
>
>                 Key: XERCESC-1638
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1638
>             Project: Xerces-C++
>          Issue Type: Bug
>    Affects Versions: 2.7.0
>            Reporter: Frank Zhou
>
> I've encountered a problem with whiteSpace handling
> for list type. I noticed that the behavior is changed
> from Xerces library 1.7 to Xerces 2.7.
> Here is the detail:
> I have a simple type defined as this:
> <element name="test" nillable="true">
>    <simpleType>
>      <restriction>
>        <simpleType>
>           <list itemType="int" />
>        </simpleType>
>        <minLength value="2" />
>      </restriction>
>    </simpleType>
> </element> 
> And the instance is like this:
> <test>
> 	51 32 59
> </test>
> In Xerces 1.7, when I turned on schema validation, I
> got "51 32 59" as the character data for element test,
> and if validation is turned off, I got the whole
> thing, including the leading/ending carriage return
> and spaces.
> However, in Xerces 2.7, not matter validation is
> turned on or off, I always got the whole thing. This
> does not seem right to me, my understanding of the XML
> schema spec is that facet whileSpace can only be
> "collapse" for list type. So I am expecting either a
> validation error for this case or the same behavior as
> Xerces 1.7.

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