[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Re: Trouble understanding how to use replace()

Subject: RE: Re: Trouble understanding how to use replace()
From: cknell@xxxxxxxxxx
Date: Fri, 06 Jan 2006 11:20:43 -0500
how to use replace
That was one of the permutations I tried, but since it gave me the same error message,

"Error on line 20 of file:/X:/PROJEC~1/MATRIX~1/xslt/NEFCF7~1.XSL:
  SXXP0003: Error reported by XML parser: Whitespace required before attributes.
Failed to compile stylesheet. 1 error detected."

as all my other attempts, I figured I had a regex problem. I'm using Saxon 8.6 on this. So if the problem isn't (now at least) the regex, what else could be the problem?
-- 
Charles Knell
cknell@xxxxxxxxxx - email



-----Original Message-----
From:     David Carlisle <davidc@xxxxxxxxx>
Sent:     Fri, 6 Jan 2006 16:07:25 GMT
To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Re:  Trouble understanding how to use replace()



replace(req-text,'"','''')

(this uses XPath2 syntax '' for a ' in a '-delimited xpath string.)

now you need to get that in an XML attribute so you need to XML-quote
the " and use " to delimit the expression

select="replace(req-text,'"','''')"

David

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.