Thanks!  This works like a charm.
--jim

On 12/8/2011 2:03 AM, Andrew Welch wrote:
Re: [Kernow] How to declare namespace URI bindings for ns-prefixedqueries

Hi,

I will take a look, however it's better to keep your query self
contained and declare your namespaces within the query itself:

declare namespace spirit = "whatever the spirit namespace is";

doc('file:///c:/path/to/the.xml')/spirit:component

cheers
andrew

On 8 December 2011 05:12, Jim Hwang <Jim.Hwang@xilinx.com> wrote:
> Hello,
> A Kernow newbie question: how are Schema namespace prefixes & URIs
> registered in Kernow in order to execute XPath queries involving the
> prefix?  I entered prefix & URI in the Namespace Bindings for the XQuery
> Sandbox GUI (Save and Close, then reopened to confirm the values persist).
> Although Kernow executes non-prefixed queries on the document (e.g., /*/*)
> without a problem, with an XPath expression including the namespace prefix,
> (say,  doc("component.xml"/spirit:component) XQuery Sandbox issues the
> following error message:
>
> XQuery static error in #...nent.xml")/spirit:component#:
> Prefix spirit has not been declared; Line#: 4; Column#: 1
>
> I'm running Kernow 1.6.1 on 64-bit Windows7 (and encounter the same problem
> with Kernow 1.7).
> Thanks.
> --jim
> This email and any attachments are intended for the sole use of the named
> recipient(s) and contain(s) confidential information that may be
> proprietary, privileged or copyrighted under applicable law. If you are not
> the intended recipient, do not read, copy, or forward this email message or
> any attachments. Delete this email message and any attachments immediately.
>
> ------------------------------------------------------------------------------
> Cloud Services Checklist: Pricing and Packaging Optimization
> This white paper is intended to serve as a reference, checklist and point of
> discussion for anyone considering optimizing the pricing and packaging model
> of a cloud services business. Read Now!
> http://www.accelacomm.com/jaw/sfnl/114/51491232/
> _______________________________________________
> Kernowforsaxon-help mailing list
> Kernowforsaxon-help@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kernowforsaxon-help
>



--
Andrew Welch
http://andrewjwelch.com

------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of
discussion for anyone considering optimizing the pricing and packaging model
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
Kernowforsaxon-help mailing list
Kernowforsaxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kernowforsaxon-help


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.