how will the parser treat the line break in an attribute value? 2003-01-17 - By David N Bertoni/Cambridge/IBM
This is standard behavior for XML. See:
http://www.w3.org/TR/REC-xml#AVNormalize
You cannot change this behavior, but you can control some things through the use numeric character references, or by using a DTD and define attributes as CDATA.
Dave
"dongjiang tang" <dtang@(protected) To: <xalan-j-users@(protected) .apache.org> om> cc: (bcc: David N Bertoni /Cambridge/IBM) Subject: how will the parser treat the line break in an attribute value? 01/17/2003 01:05 PM
Hi, I have am using XSLT to generate a HTML page with the data from XML stream. One value I need is an attribute value which could be some text of mutiple line, like <A atri1 = "line one line two line three" ></A>
after paring, seems like those line breaks are gone.
I read something online saying parser's default behaviors on the white spaces are only defined for those between a start element tag and end element tag; it does not apply for the other white spaces, like the one in attribute value, so it might be just got trimed out.
can anybody confirm this ? also if this is true, is there any configuration I can do to preserve those line break?
dongjiang
|
|