|
Subject: Re: [xsl] How to use <a style="{font: 10pt arial}"> in XSL? Keep getting error. From: Joe English <jenglish@xxxxxxxxxxxxx> Date: Tue, 06 Mar 2001 07:32:53 -0800 |
Kevin Duffey wrote:
>
> I am sure there is a good reason for why the error of "Namespace prefix font
> has not been declared" when I use the syntax of
>
> <a style="{font: 10pt arial}" href="/path/page.jsp">click</a>
If this is a literal result element in an XSLT stylesheet,
then the style="..." attribute value is interpreted as
an _attribute value template_; this means that stuff inside
curly braces is interpreted as an XPath expression and evaluated
by the XSLT processor.
That's where the error message is coming from: the XSLT processor is
trying to interpret CSS specifications as an XPath expression
(which naturally doesn't work :-)
You can escape the curly braces by doubling them up:
<a style="{{font: 10pt arial}}" href="/path/page.jsp">click</a>
See [XSLT] section 7.6.2 "Attribute Value Templates" for more details.
--Joe English
jenglish@xxxxxxxxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] How to use <a style="{fon, Scott Carlson | Thread | [xsl] tables, colspans and borders, Pollington, Lee (ELS |
| Re: [xsl] UTF-8 and Javascript, B. Dexheimer | Date | RE: [xsl] Re: implements-prefix vs , Michael Kay |
| Month |