xsl-list
[Top] [All Lists]

Re: Ampersand problem

2003-03-26 09:01:34
Try this trick. I'm assuming you are outputting as XML, so the processor
will never allow you to create an unexpanded ampersand. I don't know if this
will work on Xalan or  other Java processors because I don't have access to
it at this very second, but it works on MSXML4. This is a hideous hack,
kids, don't try this at home:

<xsl:output method="html"/>
<xsl:variable name="amper">
<xsl:text>&amp;</xsl:text>
</xsl:variable>
<xsl:template match="/">
<smil href="{$amper}">
</smil>
</xsl:template>
</xsl:stylesheet>

In other words, change the output method to HTML. You shouldn't need DOE.

Chuck White
Author, Mastering XSLT, Sybex Books
http://www.javertising.com/webtech
http://www.tumeric.net
----- Original Message -----
From: "Piers Kittel" <work(_at_)biased(_dot_)org>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Wednesday, March 26, 2003 6:10 AM
Subject: Re: [xsl] Ampersand problem


Cheers David and Robert for your prompt replies

Unfortuantely disable-output-escaping don't seem to be working at all for
some
reason.

Cheers - Piers

Quoting "Dr. Robert Spiske" <spiske(_at_)chemie(_dot_)uni-halle(_dot_)de>:


The thing is that I'm using XSLT to create the HTML and SMIL files to
contain
the correct clips, and the parser I use (Xalan) outputs "&" as "&amp;"
but
when
Quicktime tries to parse the URL, it chokes and crashes.  It *has* to
have
"&"
in the URL - "&amp;" will not work.

So how do I make Xalan output a pure "&" in the SMIL file?

Hi!

Have you tried the disable-output-escaping attribut fro xsl:value-of or

xsl:text ?

Robert



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


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




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



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