Hi, I'm using a style sheet to format my xml file.
The xml file contains the following line:
<tmp_field_one> Here is some text after 4 tabs</tmp_field_one>
and the xsl file contains the following line to render this text on the screen:
<div style="left: 0.0ex; position: absolute"><xsl:value-of select="./tmp_field_one"/></div>
Even though there are 4 tab characters prefixing the text, the output on the screen as well as the printout shows the text without any prefixing tabs. The same happens if I replace tabs with spaces or a combination of both.
Please help me with printing the tabs and spaces as they are in the xml file.
An XML parser usually converts all white space on either side of a tag (all carriage returns, tabs, line feeds, and spacebar spaces) to a single space, because elaborate combinations of whitespace characters aren't supposed to play a role in XML documents--if they did, cross-platform compatibility would suffer a great deal. See the introduction to Part 1 of this series (http://www.xml.com/pub/a/2001/11/07/whitespace.html).