Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
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 August 8th, 2013, 09:18 AM
Authorized User
 
Join Date: Aug 2013
Posts: 30
Thanks: 9
Thanked 0 Times in 0 Posts
Default up-conversion of escape characters

Dear all, I have in the data I want to transform with XSLT many <, >, & meaningfully used which I want to escape to be able to process the text: what is the best way to do this?

I have things like this

$do]mus <b=R>ito(!) consi[&

and I want to convert the meaning they have in XML nodes like

<gap/><supplied>do</supplied>mus<choice><reg>b</reg><sic>R</sic></choice>ito consil<gap/>

Thank you very much for any suggestion
 
Old August 12th, 2013, 10:47 AM
Authorized User
 
Join Date: Aug 2013
Posts: 30
Thanks: 9
Thanked 0 Times in 0 Posts
Default

I understand I might be loosing my self in a glass of water, with this question but if anybody could please point me at least to somewhere, that would really help me. Thank you very much! Pietro
 
Old August 12th, 2013, 11:39 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

I can't work out what transformation you want to apply from your input and output (it's hard to see how they relate.). But since the input is non-XML, you won't find XSLT very useful for the task.

You haven't supplied enough information to assess how you should parse the input, for example whether it can be done with regular expressions or whether you need a recursive descent parser. That depends on the detailed parse rules
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old August 13th, 2013, 10:25 AM
Authorized User
 
Join Date: Aug 2013
Posts: 30
Thanks: 9
Thanked 0 Times in 0 Posts
Default

Thank you, I will do it otherwise.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert encoded characters with escape sequence (\u03c1) VerbatimBOT ASP.NET 3.5 Professionals 3 February 25th, 2011 09:44 AM
Escape some special characters indika Visual Basic 2008 Essentials 4 September 23rd, 2010 11:18 AM
XML escape characters ACE2084 XML 0 September 9th, 2005 03:12 PM
how to escape special characters? reddygaru XML 2 December 16th, 2003 07:13 AM





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