XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] 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]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS