[xquery-talk] escape-uri() not escaping special characters
Michael Kay
mhk at mhk.me.uk
Thu Jul 7 00:09:29 PDT 2005
As with XML, an ampersand in XQuery needs to be written as &
Michael Kay
http://www.saxonica.com/
_____
From: talk-bounces at xquery.com [mailto:talk-bounces at xquery.com] On Behalf Of
Lars Burgess
Sent: 06 July 2005 19:25
To: talk at xquery.com
Subject: [xquery-talk] escape-uri() not escaping special characters
Hello,
I am having trouble getting the fn:escape-uri() function to work properly
for a particular uri. I have the following code in a xquery that parses news
information:
for $g in
fn:doc(concat(fn:escape-uri("http://feeds.foxsports.com/feedout/content?part
nerKey=RijXtgaXlG0&showData=1&noHtml=1&rankTypeCode=35&number=50&rankCategor
yId=", true()), $category))//content
When I run the XQuery, it gives the following error message:
Error on line 6 column 40 of file:/h:/fsmpro/mlb_news.xquery:
XPST0003: XQuery syntax error in #...35&number=50&rankCategoryId=",#:
No closing ';' found for entity or character reference
It appears that the special characters in the URI are not being escaped at
all. Is there some other step to getting this to work? Or is there a problem
with the code? I am using saxon engine v8.4.
Thanks,
Lars
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xquery.com/pipermail/talk/attachments/20050706/0dad9936/attachment.htm
More information about the talk
mailing list