|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Fw: <script> tag
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








