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

Re: HTML in xsl:variable

Subject: Re: HTML in xsl:variable
From: "Thomas B. Passin" <tpassin@xxxxxxxxxxxx>
Date: Wed, 13 Feb 2002 14:40:57 -0500
nbsp as entitiy in xsl
[Richard von Keyserling]

> I'm looking for a way to often used html code
> fragments in xsl variables.  if i use the html code as
> text i must escape the brackets -- which I can't seem
> to get back, upon transformation (using
> disable-output-escaping="no" doesn't change the
> reference back to the entitiy,  more over it escapes
> other chars like double quotes).
>
> I tried making it a node and callint the variable
> "string($var)" to no avail.
>
> I am now just using named templates to contain html
> fragments, but i would like to know if there is a way
> using xsl:variable
>

You can if your fragments are well-formed xml.  What are you trying to
accomplish?  Do you want a library of html tags that you insert onto the
output document?  If so, make them well-formed xml and use the "html" output
method.

If you want to get markup in the output, you shouldn't have to resort to
disabling output escaping.  But note, you will never get back any html
entities, like &nbsp;.  However, you won't have to, since if supplied as xml
they get converted into their corresponding character references, which the
browser will accept.

Cheers,

Tom P


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.