XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
(Deleted User) Subject: apostrophe in text nodes
Author: (Deleted User)
Date: 17 Jan 2000 03:26 PM
I am using xsl to transform XML in SQL I have a problem when the text node has an apostrophe in the middle. I need to transform this to at least three '. I have tried xpath translate, but no matter what combination of quot and apos I use I cannot get the xsl processor to accept.

Any ideas?

Posttop
Omri TraubSubject: apostrophe in text nodes
Author: Omri Traub
Date: 17 Jan 2000 03:32 PM
Hi,

xsl is not great at doing string manipulation. If I understand you situation, you want to translate from a string that contains single quotes to a string that replaces those single quotes by entity references. I think you can accomplish this by using the xpath contains(), substring-before(), substring-after(), and concat() functions. You can write a named template that recursively process the string until it contains no more single quotes and uses the above functions to re-assemble the string with the entity refs.

- Omri.

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.