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

RE: entities in transformations to html

Subject: RE: entities in transformations to html
From: <Jarno.Elovirta@xxxxxxxxx>
Date: Mon, 24 Jan 2005 09:05:15 +0200
xslt html entities
Hi,

> This is a generic question about what can be the best way to solve a
> simple problem. I have a database where i store different
> texts, that i
> export in xml an then transform in different formats using xslt.
>
> 1) Most of this texts are in Italian, so i have to use
> entities in html
> transformations (some user may not be able to support iso-8859-1)
>
> 2) i should need to transform texts in plain .txt or wap or something
> oother, so may be a bad idea to use html entities directly in the xml
> input processed via xslt
>
> 3) there are many html entities that i use rarely (arrows, Greek
> characters,ecc), but can be usefull in some cases...
>
> more specificly the question is:
>   -> is there in xslt any macro instruction similar to the php
> htmlenties(): a function that transform any special character of a
> string in the corresponding html entity?

No.

> ->if not, what can i do?

If your XSLT processor support ASCII output, use for serialization (encoding
attribute on xsl:output element). Non-ASCII characters will be serialized as
character entities or entity references.

Cheers,

Jarno

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.