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