Subject: Re: [xsl] Fw: <script> tag From: Goetz Bock <bock@xxxxxxxxxxx> Date: Mon, 1 Oct 2001 18:11:07 +0200 |
On Mon, Oct 01 '01 at 16:41, Luís Camacho wrote: > My question is: should the <script> tag mean anything for a XSLT parser? This is just an educated guess, but you're using html as output format? <xsl:output method="html" /> In this case your xslt processor, of cause knows how to do html, and script has a special meaning in html. > Stylesheet: > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > <xsl:output method="xml" cdata-section-elements="script"/> > <xsl:template match="/"> > <script language="javascript">alert("<>")</script> > <script2 language="javascript">alert("<>")</script2> > </xsl:template> > </xsl:stylesheet> > > Result: > <script language="javascript">alert("<>")</script><script2 > language="javascript">alert("<>")</script2> > > Note that my intended result is the one relating to the script2 tag. The <script ...> resutl is proper html. <script2 ...> is no html, but the output is wrong. To get your result: <xsl:template match="/"> <script language="javascritp">alert("&lt;&gt;")</script> </xsl:template> -- Goetz Bock IT Consultant Dipl.-Inf. Univ.
Attachment:
pgp00001.pgp
Description: PGP signature
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Fw: <script> tag, Luís Camacho | Thread | Re: [xsl] Fw: <script> tag, David Carlisle |
Re: [xsl] child nodes containing a , Goetz Bock | Date | RE: [xsl] Fw: <script> tag, Zwetselaar M. van (M |
Month |