Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 19th, 2006, 05: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
Send a message via Skype™ to ROCXY
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.
Reply With Quote
  #2 (permalink)  
Old January 19th, 2006, 05:55 AM
mhkay's Avatar
Wrox Author
Points: 17,773, Level: 58
Points: 17,773, Level: 58 Points: 17,773, Level: 58 Points: 17,773, Level: 58
Activity: 8%
Activity: 8% Activity: 8% Activity: 8%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,839
Thanks: 0
Thanked 267 Times in 262 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
Reply With Quote
  #3 (permalink)  
Old January 19th, 2006, 07: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
Send a message via Skype™ to ROCXY
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


Reply With Quote
  #4 (permalink)  
Old January 19th, 2006, 07:50 AM
mhkay's Avatar
Wrox Author
Points: 17,773, Level: 58
Points: 17,773, Level: 58 Points: 17,773, Level: 58 Points: 17,773, Level: 58
Activity: 8%
Activity: 8% Activity: 8% Activity: 8%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,839
Thanks: 0
Thanked 267 Times in 262 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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 08:54 AM
XSL transformation Thodoris XML 0 May 20th, 2004 08:33 AM



All times are GMT -4. The time now is 07:23 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.