xsl-list
[Top] [All Lists]

Re: Can I put a variable to be interpreted in an xml node?

2004-07-14 01:51:04
Hi,

I don't think you need to use CDATA; if you do something like

<tagname>
  <div xmlns="http://www.w3.org/1999/xhtml";>
    You can find the link <a href="{$link}">here</a>
  </div>
</tagname>

and then use <xsl:copy-of> instead of <xsl:value-of>.

HTH
Anton

----- Original Message ----- 
From: "Bart Claeys" <Bart(_dot_)Claeys(_at_)sportpaleis(_dot_)be>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Wednesday, July 14, 2004 9:56 AM
Subject: [xsl] Can I put a variable to be interpreted in an xml node?


Hello all!

I'm new to this list, and this is my first question. I have a two-lingual 
website (dutch & french). The texts are manually put in
a seperate XML file. Now in one case the text contains a variable, like in 
this example:

<tagname><![CDATA[You can find the link <a 
href="{$link}">here</a>]]></tagname>

Obviously when I pull this tag into the document using <value-of the {$link} 
is not interpreted. How can I solve this problem?
I need to use CDATA because the tag can contain html code like bold, 
paragraph tags etc.

Thnks, Bart
*************************************************************************************************
The contents of this email and any attachments are confidential.
It is intended for the named recipient(s) only.
If you have received this email in error please notify the system manager or
the sender immediately.
Do not disclose the contents to anyone nor make copies of this mail.
*************************************************************************************************


--+------------------------------------------------------------------
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>
--+--