You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Er...@Classwell.com on 2002/06/24 18:23:53 UTC

followup: SAX loses space before &

I guess I didn't report this in time to make the 2.0.2 release. What is the
best way to follow the progress of this issue? Would this have been
registered with Bugzilla by someone on the schema team, or should I be
opening a Bugzilla myself? (I don't know if there's an established process
for syncing list-reported issues with Bugzilla.) Should I be asking this to
the dev list instead of the user list?

I see it as a pretty critical issue because it loses data. I'm using this
for some tools that read in and write back out xml documents, and obviously
losing data like this Very Bad Thing. So if / when there is a fix to some
source file, I'll be eager to download it and patch my jars...

Thanks,

Eric



                                                                                                                                                   
                      Andy Clark                                                                                                                   
                      <andyc@apache.org        To:       xerces-j-dev@xml.apache.org                                                               
                      >                        cc:       Eric_Schwarzenbach@Classwell.com                                                          
                                               Subject:  Re: SAX loses space before &amp;   ??                                                     
                      06/19/2002 04:09                                                                                                             
                      AM                                                                                                                           
                                                                                                                                                   
                                                                                                                                                   




Eric_Schwarzenbach@Classwell.com wrote:
> Here's a minimal test case. Maybe it's specific to using schemas...

Verified.

You can verify by using the sax.Counter to see that the
whitespace after the "this" is stripped -- but only when
Schema validation is turned on.

# No Validation
D:\download>java -Djava.ext.dirs=. sax.Writer testAmp.xml
<?xml version="1.0" encoding="UTF-8"?>
<testroot xsi:schemaLocation="http://xml.classwell.com/clg test.xsd">
     <test>This &amp; that</test>
</testroot>

# XML Schema Validation
D:\download>java -Djava.ext.dirs=. sax.Writer testAmp.xml
<?xml version="1.0" encoding="UTF-8"?>
<testroot xsi:schemaLocation="http://xml.classwell.com/clg test.xsd">
     <test>This&amp; that</test>
</testroot>

 > (See attached file: test.xsd)(See attached file: testAmp.xml)

Could someone please fix this in the XML Schema validator?

--
Andy Clark * andyc@apache.org
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://xml.classwell.com/clg" xmlns:clg="
http://xml.classwell.com/clg" xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
             <xs:element name="testroot">
                         <xs:complexType>
                                     <xs:sequence minOccurs="0" maxOccurs
="unbounded">
                                                 <xs:element name="test"
type="xs:token"/>
                                     </xs:sequence>
                         </xs:complexType>
             </xs:element>
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<testroot xmlns="http://xml.classwell.com/clg" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://xml.classwell.com/clg test.xsd">
    <test>This &amp; that</test>
</testroot>




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org