[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

X Query NameSpace related Query

David Carlisle davidc at nag.co.uk
Thu Aug 24 17:08:40 PDT 2006


co related query
> I use  "declare namespace xs='http://www.w3.org/2001/XMLSchema';"+
> Query

the xs namespace is predefined in XQuery, you don't need to declare it.

<ContractHeader xmlns="http://www.kroger.com/JDE"


So the top level element is {http://www.kroger.com/JDE}ContractHeader
and to match that in a Query path expression you'd do something like

declare namespace j="http://www.kroger.com/JDE";
for $e in /j:ContractHeader .....

or

declare default element namespace "http://www.kroger.com/JDE";
for $e in /ContractHeader .....


if you just do
for $e in /ContractHeader .....

then you are selecting {}ContractHeader ie an element with local name
ContractHeader in no-namespace but there are no elements with that name
in your input.

David


Purchase Stylus Studio Online Today!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.