xsl-list
[Top] [All Lists]

Re: [xsl] Clean XSL code for the following javascript

2007-01-17 15:18:53
Ahh!  I like the double braces best anyhow... will do. (too bad that
doesn't work with the apostrophe)

On 1/17/07, Michael Kay <mike(_at_)saxonica(_dot_)com> wrote:
If you're going to use hexadecimal character references, they need to be
written as

&#x007B;
&#x007D;

But this won't help you. The character references are seen by XSLT/XPath as
curly braces. The mechanism for escaping curly braces in XSLT is to double
them: {{ and }}.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: Karl Stubsjoen [mailto:kstubs(_at_)gmail(_dot_)com]
> Sent: 17 January 2007 15:57
> To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
> Subject: [xsl] Clean XSL code for the following javascript
>
> What is the cleanest way to code the following javascript
> code in my XSL:
>
> <a href="#" onlick="Position.clone('ElementA', 'ElementB', {setHeight:
> false, setWidth: false})">-click-<a/>
>
> These are the correct (??) unicode characters for:
>
> { =  &#007B;
> } =  &#007D;
>
> Here is where I found these codes:
> http://www.unicode.org/charts/PDF/U0000.pdf
>
> I tried injecting this straight into the onlick attribute,
> but failing with a decimal syntax issue... (which I haven't
> seen before).
>
> So I tried:
>
> <a href="#" onclick="Position.clone('{$ElementA}', '{$ElementB}',
> &#007B;setheight: false, setWidth: false &#007D;)">-click me-</a>
>
> The exact error is:
> Invalid character in a decimal number 'B'
>
>
>
> Karl..
>
> --~------------------------------------------------------------------
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
> --~--
>


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--