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

RE: Best practice question, regarding escaped entitiy

Subject: RE: Best practice question, regarding escaped entitiy decla rations
From: "Diamond, Jason" <Jason.Diamond@xxxxxxx>
Date: Tue, 26 Mar 2002 17:38:03 -0600
doctype xsl transform
> > You could also define an entity in your document's internal 
> > subset. That's
> > more convenient than using an XSLT variable since you don't 
> > have to use
> > xsl:value-of to output it.
> > 
> 
> Can you describe how this is done?

<!DOCTYPE xsl:transform [
	<!ENTITY pound '&#xA3;'>
]>
<xsl:transform version='1.0'
	xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
>
	<xsl:output method='text' />

	<xsl:template match='/'>&pound;</xsl:template>

</xsl:transform>

Run this transform against any XML document (even itself), redirect the
output to a text file, and then open that text file in a Unicode aware
editor (like Notepad) and you'll see a single British Pound sign.

Almost all of my transforms have an internal subset at the top that define
things like nbsp, newlines, tabs, etc.

Jason

 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.