Michael Sokolov wrote:
Hi,
> Isn't it true that in other contexts one can also declare a
> namespace prefix in the processing environment that may not be
> available in the document itself? For example, in XSLT I think
> this is possible, as well as in a Java processor that
> implements XPath.
Yes, there are other XML processors that can do this. Saxon, for
example, you can pass it in programmatically,
and I believe XSLT can. Xmlsh can. So its not unique to XQuery, but I
believe its not possible in pure XPath.
-Original Message-
From: general-boun...@developer.marklogic.com
Isn't it true that in other contexts one can also declare a namespace prefix
in the processing environment that may not be available in the document
itself? For example, in XSLT I think this is possible, as well as in a Java
processor that implements XPath. I don't think it's something unique to
"Lee, David" wrote:
Hi David (I didn't pay attention who I was responding to ;-))
> The key I re-discovered here is Xquery lets you add that extra
> glue to define a prefix outside of xpath, and outside of the
> document.
Ah I see, yes the declare namespace statement is the key you
were afte
No thanks, I understand all that about prefixes and URI's.
I just didn't realize XQuery could do it because I've ran into this in pure
XPath before
and couldn't find a way. If a document uses unprefixed URI's there's no XPath
syntax to represent that (to my knowledge). While prefixes are mostl
"Lee, David" wrote:
> wow thanks ! I didnt know you could do that. Declare a prefix
> for a namespace to query a non-prefixed document without
> changing the document.
It seems you misunderstood QNames then, as the prefix is non
relevant. The name of an element or an attribtue is a QName,
tha