[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: |
Per Bothner |
Subject: |
[Bug-kawa] [bug #23176] XMLNS seems to break XQuery |
Date: |
Mon, 05 May 2008 19:52:32 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b5) Gecko/2008043010 Fedora/3.0-0.60.beta5.fc9 Firefox/3.0b5 |
Update of bug #23176 (project kawa):
Status: None => Invalid
Assigned to: None => bothner
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #1:
This is correct. The 'p' in the XQuery program means to match against an
element p in the "default element namespace", which is the empty namespace.
http://www.w3.org/TR/xquery/#node-tests
"An unprefixed QName, when used as a name test on an axis whose principal
node kind is element, has the namespace URI of the default element/type
namespace in the expression context; otherwise, it has no namespace URI."
Since you haven't defined a default element namespace, the default for the
default element namespace is the empty namespace, which doesn't match
"http://www.w3.org/1999/xhtml".
You can set the default element namespace as described here:
http://www.w3.org/TR/xquery/#id-default-namespace
Note if you want to match 'p' in *any* namespace, you can write *:p as in:
doc("xq_test.html")//*:p/text()
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?23176>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/