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

RE: Embedding an SSI echo in an XML attribute

Subject: RE: Embedding an SSI echo in an XML attribute
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 9 May 2007 10:32:21 +0100
RE:  Embedding an SSI echo in an XML attribute
There's never a clean way to generate invalid XML. In XSLT 2.0 you can
achieve this using character maps: map a couple of private-use-area
characters to the strings "<!--" and "-->". This should at least mean that
you can generate a proper element and attribute node. But you're still
dependent on the transformation phase being immediately followed by
serialization.

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

> -----Original Message-----
> From: tom tom [mailto:tomxsllist@xxxxxxxxxxx] 
> Sent: 09 May 2007 10:11
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Embedding an SSI echo in an XML attribute
> 
> I need to generate an apache .sssi file that contains the 
> following kind of
> code:
> 
> <a href="<!--#echo var="grar.5.url" encoding="none" -->">link</a>
> 
> To acheive this in XSLT 1 we generated the code as CDATA in a 
> plain text
> file:
> 
> <xsl:text disable-output-escaping="yes">&lt;a 
> href="</xsl:text> <xsl:comment>#echo var='grar.5.url' 
> encoding='none'</xsl:comment> <xsl:text 
> disable-output-escaping="yes">"&gt;link&lt;/a&gt;</xsl:text>
> 
> Can anyone advise on a cleaner way to do this using XSLT 2?
> 
> _________________________________________________________________
> Txt a lot? Get Messenger FREE on your mobile.  
> https://livemessenger.mobile.uk.msn.com/

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.