Subject: a special char question From: "Selim Cesic" <Selim.Cesic@xxxxxxxxx> Date: Fri, 23 Jun 2000 09:11:27 +0200 |
Hi all, I have a piece of XML <LOGS> <LOG TIME="Fri Jun 23 08:28:59 GMT+02:00 2000" LEVEL="1"><</LOG> <LOG TIME="Fri Jun 23 08:28:59 GMT+02:00 2000" LEVEL="1">></LOG> <LOG TIME="Fri Jun 23 08:28:59 GMT+02:00 2000" LEVEL="1">&</LOG> <LOG TIME="Fri Jun 23 08:28:59 GMT+02:00 2000" LEVEL="1"><&></LOG> <LOG TIME="Fri Jun 23 08:28:59 GMT+02:00 2000" LEVEL="1"><<</LOG> <LOG TIME="Fri Jun 23 08:28:59 GMT+02:00 2000" LEVEL="1">>></LOG> </LOGS> that represents logs from my system that are preprocessed while logging: each time a log attempt is made i replace characters as following (is this correct?): & is replaced by & < is replaced by < > is replaced by > and when the LogView is requested, I process it with the IBM Lotus processor and with the stylesheet underneath. However, in my browser I see Fri Jun 23 08:40:40 GMT+02:00 2000 < Fri Jun 23 08:40:40 GMT+02:00 2000 > Fri Jun 23 08:40:40 GMT+02:00 2000 & Fri Jun 23 08:40:40 GMT+02:00 2000 <6162 Fri Jun 23 08:40:40 GMT+02:00 2000 <66 Fri Jun 23 08:40:40 GMT+02:00 2000 >70 instead of Fri Jun 23 08:40:40 GMT+02:00 2000 < Fri Jun 23 08:40:40 GMT+02:00 2000 > Fri Jun 23 08:40:40 GMT+02:00 2000 & Fri Jun 23 08:40:40 GMT+02:00 2000 <&> Fri Jun 23 08:40:40 GMT+02:00 2000 << Fri Jun 23 08:40:40 GMT+02:00 2000 >> Altough this is only a test scenario which may never occur in my application I need to know why are these characters not outputed well when being written next to each other (the first 3 lines (stand-alone chars) are OK). stylesheet template that does the work is: <!-- Template rule for the LOGS element --> <xsl:template match="LOGS"> <HTML> <HEAD> <TITLE>LOGS</TITLE> </HEAD> <BODY bgcolor="#003399" link="#001133" vlink="#000000" TEXT="#FFCC00" alink="#000022"> <TABLE BORDERCOLOR="#003399" WIDTH="100%" BORDER="0"> <TH bgcolor="#800000"><FONT SIZE="2">Time</FONT></TH> <TH bgcolor="#800000"><FONT SIZE="2">Log Content</FONT></TH> <xsl:for-each select="LOG"> <TR bgcolor="#008000"> <TD><FONT SIZE="2"><b><xsl:value-of select="@TIME"/></b></FONT></TD> <TD> <xsl:choose> <xsl:when test="@LEVEL='ERROR'"> <!-- Error level -> red -> FF0000 --> <FONT SIZE="2" COLOR="#FF0000"><b><xsl:value-of disable-output-escaping="yes" select="."/></b></FONT> </xsl:when> <xsl:when test="@LEVEL='WARNING'"> <!-- Warning level -> almost red -> CD4232 --> <FONT SIZE="2" COLOR="#CD4232"><b><xsl:value-of disable-output-escaping="yes" select="."/></b></FONT> </xsl:when> <xsl:when test="@LEVEL='DEBUG'"> <FONT SIZE="2"><b><xsl:value-of disable-output-escaping="yes" select="."/></b></FONT> </xsl:when> <xsl:otherwise> <FONT SIZE="2"><b><xsl:value-of disable-output-escaping="yes" select="."/></b></FONT> </xsl:otherwise> </xsl:choose> </TD> </TR> </xsl:for-each> </TABLE> </BODY> </HTML> </xsl:template> can anyone help? thanks in advance -SeJo XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: XSL FO to HTML Stylesheet, Jon Smirl | Thread | Re: XSL FO to HTML Stylesheet, Nikolai Grigoriev |
RE: XML to WML, Ivar Snaaijer | Date | Re: XSL FO to HTML Stylesheet, Nikolai Grigoriev |
Month |