XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
A PSubject: XQuery
Author: A P
Date: 10 Oct 2005 11:42 PM
Dear Sir/Madam,
I tried to split XQuery:

doc(“bib.xml”)//last

into

for $l in doc("bib.xml")/bib/book/author/last
return
{ $l }
and
for $e in doc("bib.xml")/bib/book/editor/last
return
{ $e }

but I receive errors.

Could you please tell me how to split

doc(“bib.xml”)//last

into two queries, so that I get last names of author and last names of editors without using (//).

Thanks in advance…

Posttop
(Deleted User) Subject: XQuery
Author: (Deleted User)
Date: 12 Oct 2005 11:55 AM
Hi,
you can use the XPath expression

doc("bib.xml")/bib/book/(author|editor)/last

Hope this helps,
Alberto

 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.