[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: xQuery strip namespace

Subject: RE: xQuery strip namespace
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sat, 9 Apr 2005 19:08:24 +0100
xquery namespace
Firstly, XQuery is out of scope for this list. There are a number of places
that cover XQuery, for example http://lists.w3.org/Archives/Public/www-ql/

Second: the "declare xmlspace" declaration controls the handling of
whitespace in the text of the query. It has nothing whatsoever to do with
namespaces. It might be that the copy-namespaces declaration does what you
want. See

http://www.w3.org/TR/xquery/#id-copy-namespaces-decl

However, this only gets rid of unused namespace nodes: it will not change
the element you are copying to be in a different namespace, so the namespace
of the element name of that node will always be declared.

Michael Kay
http://www.saxonica.com/

> 
> i use the following xquery query in java , even i wrote the function
> "declare xmlspace  strip;"at the begining of the query i still get the
> name space declaration associate with the elements name
> 
> and i have no idia on how to strip all the namspaces
> 
> any help please
> 
> 
> public static String theBodyofquery6(String last,String gridRef,String
> Stime,String Sdate,String Etime,String Edate){
>              String result= " declare xmlspace  strip;  
> <SystemRecord> { 
> for $a in doc(\"observation.xml\")//observation where  $a
> /last=\""+last+"\" and   $a/gridRef=\""+gridRef+"\" and $a
> /time >=\""+Stime+"\" and  $a /date >=\""+Sdate+"\" and $a
> /time <=\""+Etime+"\" and $a /date <=\""+Edate+"\"     return
>  <item>   { $a /* }      </item> } </SystemRecord>";
> 
>             return result;
>      }

Current Thread

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-2013 All Rights Reserved.