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

usage of entities (for dummies)

Subject: usage of entities (for dummies)
From: "Georg Hohmann" <georg.hohmann@xxxxxxxxx>
Date: Thu, 3 Aug 2006 11:45:13 +0200
definiton of entities
I'm bothering with the usage of entities. I found myself starring a
long time at the definiton of entities and the xslt-faq but without
getting a glimpse how to solve a problem i will describe in the
following.

I have to replace occurences of something like this "^12" (a custom
placeholder) with a special character, for example a cedilla
(http://en.wikipedia.org/wiki/Cedilla). Therefore i use Michael's
"identity template" in combination with this replace function:
<xsl:value-of select="replace(., '\^12', '&ccedil;')"/>

Many questions arise around this approach (at least for me):
1.) If i use the above i get "the entity is not declared", but when i
use "&amp;" instead of the cedilla everything works fine. How do i
know which entities are declared by default and which not? How can i
declare an entity of my own?
2.) What is the difference of the usage of - for example - "&amp;" and
"&#38;"? When do i have to use the one and not the other?
3.) And where can i find a good overview of enitites?

Finally i have also a non-entity question:
I have to replace many of equivalent placeholders in the same text
too. Do i have to nest replace-functions for each of them in one
another like ...
<xsl:value-of select="replace(replace(., '\^12', '&ccedil;'), '\^13',
'&amp;')"/>
... or is there a more elegant solution for this?

Well, that are many questions, but also answers to a few of them could
help me out.

Regards,
Georg

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.