[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] usage of entities (for dummies)
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', 'ç')"/> 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 "&" 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 - "&" and "&"? 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', 'ç'), '\^13', '&')"/> ... 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|