Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
| Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 19th, 2006, 06:29 AM
Authorized User
Points: 345, Level: 6
Points: 345, Level: 6 Points: 345, Level: 6 Points: 345, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2005
Location: , , .
Posts: 71
Thanks: 10
Thanked 0 Times in 0 Posts
Default Accented characters transformation in XSL

Hi All,

Following is a XML file

<para>John O'Donovan, Annála roghachta Éireann: Annals of the kingdom</para>

I would like to convert it as follows

<para>John O'Donovan, Annála roghachta Éireann: Annals of the kingdom</para>

Exactly I don’t know how to frame this case in XSL, because I am new using entity transformation in XSL.

SAXON is my XSLT processor.

I sincerely appreciate any help in this regard.

Thanks & Regards,
- ROCXY


__________________
Thanks,
Rocxy.
 
Old January 19th, 2006, 06:55 AM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Your output seems to be identical to your input - presumably this isn't what you intended.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old January 19th, 2006, 08:11 AM
Authorized User
Points: 345, Level: 6
Points: 345, Level: 6 Points: 345, Level: 6 Points: 345, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2005
Location: , , .
Posts: 71
Thanks: 10
Thanked 0 Times in 0 Posts
Default

I would like to convert it as follows

<para>John O'Donovan, Ann &.aacute; la roghachta &E.acute;ireann: Annals of the kingdom</para>

Please strip "." while reading.

aacute;
Eacute;

I sincerely appreciate any help in this regard.

Thanks & Regards,
- ROCXY


 
Old January 19th, 2006, 08:50 AM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

You mean, you want the entity references to be used in the output?

This will happen automatically with the HTML output method (in Saxon), because HTML has predefined entities for these characters. This isn't true of XML output. You can force it using character maps, but it's hard work. To be honest, XSLT is best for manipulating XML at the logical level, and if you need to manipulate the physical level you may be better off with a tool such as awk or sed.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference




Similar Threads
Thread Thread Starter Forum Replies Last Post
xsl transformation ... rajesh_css XSLT 5 September 30th, 2008 12:37 AM
XSL-Transformation atulshin XSLT 4 September 15th, 2008 06:37 AM
Match accented characters with a regular expr. dacian PHP How-To 0 February 22nd, 2007 09:54 AM
XSL transformation Thodoris XML 0 May 20th, 2004 08:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.