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

Re: Help with Xquery

  • From: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>
  • To: Modulus Solutions-Inc <modulusinc@gmail.com>
  • Date: Thu, 10 Dec 2009 18:57:41 -0700

Re:  Help with Xquery

On 30 Nov 2009, at 09:04 , Modulus Solutions-Inc wrote:

> Hi,
>
> Please help me with Xquery below:
>
> I would like to get all the patent_number records where  
> person_name_full="Huber, Avigdor"
>
>
> fn:doc()/document/CMSdoc/doc_type_grp/patent_pub_grp/patent_number
> fn:doc()/document/CMSdoc/doc_general/authors_grp/author_grp/ 
> person_name[person_name_full="Huber, Avigdor"]
>

I'm not quite sure what your two XPath expressions signify (so
I may not have understood your question).  If you mean that you
want to match all of the CMSdoc elements which have a patent
number and which have an author named Avigdor Huber, then you
might try something like

   for $doc in fn:doc()/document/CMSdoc
   where $f/doc_type_grp/patent_pub_grp/patent_number
         and
         $f/doc_general/authors_grp/author_grp/person_name
           [person_name_full = "Huber, Avigdor"]
   return $f

Or just

   fn:doc()/document/CMSdoc
     [doc_type_grp/patent_pub_grp/patent_number
      and
      doc_general/authors_grp/author_grp/person_name
        [person_name_full="Huber, Avigdor"]
     ]

-- 
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net
****************************************************************






[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.