I think this is a bug of parse-xml-fragment() since the string passed in $feed 
is a wellformed escaped xml fragment. 
The xQuery-processor is trying to replace & by & which makes no sense and 
produces like that an error ;-(

What do the experts say ?

Blessings
Leo



> On 21.06.2015, at 20:22, Leo Studer <[email protected]> wrote:
> 
> Yes, $feed contains the expected info, no namespace issue here…
> 
> Try it out. 
> BaseX does not report an error however the code does not work and Saxon 
> reports
> 
> Engine name: Saxon-PE XQuery 9.6.0.5
> Severity: fatal
> Description: FODC0006: First argument to parse-xml-fragment() is not a 
> well-formed and namespace-well-formed XML fragment. XML parser reported: 
> org.xml.sax.SAXParseException: The reference to entity "service" must end 
> with the ';' delimiter.
> 
> 
>> On 21.06.2015, at 19:10, Dannes Wessels <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> Does the doc()//item/... expression return anything? I expect a namespace 
>> issue here...
>> 
>> Cheers
>> 
>> Dannes
>> 
>> 
>> --
>> www.exist-db.org <http://www.exist-db.org/>
>> 
>> On 21 Jun 2015, at 17:15, Leo Studer <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>>> Hello
>>> 
>>> I tried the following
>>> 
>>> declare variable $feed := 
>>> doc("http://www.meteotest.ch/meteotest-extras/rss/rss-sio.xml 
>>> <http://www.meteotest.ch/meteotest-extras/rss/rss-sio.xml>")//item/description/string();
>>> 
>>> <html>
>>> <body>{
>>> parse-xml-fragment($feed)/*}
>>> </body>
>>> </html>
>>> 
>>> to use the weather infos from this feed.
>>> Unfortunately parse-xml-fragment($feed) does not work since & is used in a 
>>> URL. Is there a easy way to do that?
>>> 
>>> Thanks in advance
>>> Leo
>>> _______________________________________________
>>> [email protected] <mailto:[email protected]>
>>> http://x-query.com/mailman/listinfo/talk 
>>> <http://x-query.com/mailman/listinfo/talk>_______________________________________________
>> [email protected] <mailto:[email protected]>
>> http://x-query.com/mailman/listinfo/talk
> 
> _______________________________________________
> [email protected]
> http://x-query.com/mailman/listinfo/talk

_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk

Reply via email to