DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3662>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3662

           Summary: Xerces always trims attribute values regardless of
                    datatype defined in schema
           Product: Xerces-J
           Version: 1.4.3
          Platform: All
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Core
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Xerces appears to be always trimming leading and trailing whitespaces
for attribute values regardless of the datatype defined in the schema.

For example, given the following XML and schema,

<?xml version="1.0"?>
<A>
  <B attB1="  A   B   C   "/>
</A>

<?xml version ="1.0"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";>

  <xs:element name="A" >
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="B" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="B" >
    <xs:complexType>
      <xs:attribute name="attB1" type="xs:string" use="required" />
    </xs:complexType>
  </xs:element>

</xs:schema>


The value of attB1 is reported as "A   B   C" rather than "  A   B   C   ".
attB1 is defined as "string", so the value of which should be reported
as intact.

-Takuki Kamiya

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to