[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


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



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


for $g in
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.




-------------- 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