[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-kawa] [bug #23176] XMLNS seems to break XQuery
From: |
Art Bugorski |
Subject: |
[Bug-kawa] [bug #23176] XMLNS seems to break XQuery |
Date: |
Tue, 06 May 2008 16:11:03 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-us) AppleWebKit/523.15.1 (KHTML, like Gecko) Version/3.0.4 Safari/523.15 |
Follow-up Comment #3, bug #23176 (project kawa):
I thought I'd post the complete solution for anyone who may come across this
issue by having the same problem two *proper* working solutions are
[code]
declare namespace h = "http://www.w3.org/1999/xhtml";
let $d := doc("xq_test.html")//h:p/text()
return $d = "pass"
[/code]
or
[code]
declare default element namespace "http://www.w3.org/1999/xhtml";
let $d := doc("xq_test.html")//p/text()
return $d = "pass"
[/code]
The [code]doc("xq_test.html")//*:p/text()[/code] solution mentioned by
bothner is not semantically correct since it selects any 'p' (i.e. from ANY
namespace an thus not necessarily just paragraph tags from HTML, but since
there is only HTML in this document it will work in this case. Should you
however embed another XML document into this one and shold that document have
a 'p' tag then that would also get selected.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?23176>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/