xsl-list
[Top] [All Lists]

RE: how to get < sign in output of an xslt

2003-01-06 09:45:08
[Sai, Mukundan]

i have an xslt which is outputting a text ...
i want  '< ' symbol to appear in the text output ...
when i use  &lt; it is outputted as '&lt;' only not as '<' .. 
only if i view the ouput in ie do i get '<' symbol .. can 
anybody tell me how 
to get '<' in the text output of an xslt ..
thanks in advance  

The solution depends on what you want to achieve.  If you want the
output to **look like** "<" in a browser, you do not have to do
anything.  The html or xml output will actually contain "&lt;" but it
will **display** as you want in the browser.

If you want to produce text output (for the entire output document), and
not html or xml,  then specify method='text' in the xsl:output element,
and a real "<" will be emitted.

If you want to have an actual "<" in xml or html output, you cannot have
that.  This is a fundamental thing about xml (and html).

Cheers,

Tom P

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>