[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Can I put a variable to be interpreted in an xml

Subject: RE: Can I put a variable to be interpreted in an xml node?
From: "Bart Claeys" <Bart.Claeys@xxxxxxxxxxxxxx>
Date: Wed, 14 Jul 2004 16:06:38 +0200
bart claeys
Hi Michael,

Thanks for your reply.
So, what you're saying is that I shouldn't use any HTML tags in an XML document?
Or are you saying that I should be using strickt XHTML?

The fact is that I can redesign the source document, but I've no clue how. I need to put a sentence in multiple languages in 
the XML document and one of the words should be a link, as follows:

Forgot your password? Fill in <a href="{$link}">this form</a> to retrieve your password.

Grtz,

Bart

On 14 Jul 2004 at 9:28, Michael Kay wrote:

> > 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.
> 
> It's much better to use well-formed markup in the source document. By
> putting tags in CDATA, you are telling the system "this isn't markup,
> it's ordinary text", which patently isn't true, and has the effect
> that it makes the internal structure inaccessible to the XPath and
> XSLT processors.
> 
> If you can't redesign the source document, then try to find a
> processor that supports the disable-output-escaping option, and use
> <xsl:value-of with disable-output-escaping="yes"/>. This is not a good
> solution, because it means you rely on the result tree being
> serialized as part of the transformation, but it may be your only
> escape route from a poor document design.
> 
> Michael Kay
*************************************************************************************************
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.
*************************************************************************************************

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.