xsl-list
[Top] [All Lists]

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

2006-01-06 09:20:43
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(_at_)onebox(_dot_)com - email



-----Original Message-----
From:     David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk>
Sent:     Fri, 6 Jan 2006 16:07:25 GMT
To:       xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject:  Re: [xsl] 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



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--