how will the parser treat the line break in an attribute value? 2003-01-17 - By dongjiang tang
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2800.1106" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>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</FONT></DIV> <DIV><FONT face=Arial size=2> line two</FONT></DIV> <DIV><FONT face=Arial size=2> line three" ></A></FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>after paring, seems like those line breaks are gone. </FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2><FONT face="Times New Roman" size=3>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.</FONT></FONT></DIV> <DIV><FONT face=Arial size=2><FONT face=Arial size=2></FONT></FONT> </DIV> <DIV><FONT face=Arial size=2><FONT face="Times New Roman" size=3>can anybody confirm this ? also if this is true, is there any configuration I can do to preserve those line break?</FONT></FONT></DIV> <DIV><FONT face=Arial size=2><FONT face="Times New Roman" size=3></FONT></FONT> </DIV> <DIV><FONT face=Arial size=2><FONT face="Times New Roman" size=3>dongjiang</FONT></DIV> <DIV><BR></DIV></FONT></BODY></HTML>
|
|