You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2001/09/17 22:19:56 UTC
DO NOT REPLY [Bug 3662] New: -
Xerces always trims attribute values regardless of datatype defined in schema
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: xerces-j-dev@xml.apache.org
ReportedBy: tkamiya@iona.com
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: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org