Predicates in XPointer

I recently read the XPointer spec in detail and also went through
the excellent slides provided by Elliotte. There is something
things that puzzles me regarding predictes.

I realise that predicate specifcation has to be kept simple but It would
be great to have existential and universal quantifiers. In certain cases it
is not easy to select an element without this support. For example if we
have  an XML (example from  Elliotte's slides)  as is attached in this email
how would you conveniently specify and select
        i) a Person whose  all children are alive. (in case of more than 1
           result just give the result at first position)
        ii) a Person who has only one child (more than one result should
           be handled as in previous case)
        iii)  Thr first person where at least one child alive


Regards,

Hardeep Singh
UBS AG
Zurich


 =====================Sample XML specification========
   <FAMILYTREE>

  <PERSON ID="p1">
    <NAME>Domeniquette Celeste Baudean</NAME>
    <BORN>11 Feb 1858</BORN>
    <DIED>12 Apr 1898</DIED>
    <SPOUSE IDREF="p2"/>
  </PERSON>

  <PERSON ID="p2">
    <NAME>Jean Francois Bellau</NAME>
    <SPOUSE IDREF="p1"/>
  </PERSON>

  <PERSON ID="p3" FATHER="p2" MOTHER="p1">
    <NAME>Elodie Bellau</NAME>
    <BORN>11 Feb 1858</BORN>
    <DIED>12 Apr 1898</DIED>
    <SPOUSE IDREF="p4"/>
  </PERSON>

  <PERSON ID="p4" FATHER="p2" MOTHER="p1">
    <NAME>John P. Muller</NAME>
    <SPOUSE IDREF="p3"/>
  </PERSON>

  <PERSON ID="p7">
    <NAME>Adolf Eno</NAME>
    <SPOUSE IDREF="p6"/>
  </PERSON>

  <PERSON ID="p6" FATHER="p2" MOTHER="p1">
    <NAME>Maria Bellau</NAME>
    <SPOUSE IDREF="p7"/>
  </PERSON>

  <PERSON ID="p5" FATHER="p2" MOTHER="p1">
    <NAME>Eugene Bellau</NAME>
  </PERSON>

  <PERSON ID="p8" FATHER="p2" MOTHER="p1">
    <NAME>Louise Pauline Bellau</NAME>
    <BORN>29 Oct 1868</BORN>
    <DIED>3 May 1938</DIED>
    <SPOUSE IDREF="p9"/>
  </PERSON>

  <PERSON ID="p9">
    <NAME>Charles Walter Harold</NAME>
    <BORN>about 1861</BORN>
    <DIED>about 1938</DIED>
    <SPOUSE IDREF="p8"/>
  </PERSON>

  <PERSON ID="p10" FATHER="p2" MOTHER="p1">
    <NAME>Victor Joseph Bellau</NAME>
    <SPOUSE IDREF="p11"/>
  </PERSON>

  <PERSON ID="p11">
    <NAME>Ellen Gilmore</NAME>
    <SPOUSE IDREF="p10"/>
  </PERSON>

  <PERSON ID="p12" FATHER="p2" MOTHER="p1">
    <NAME>Honore Bellau</NAME>
  </PERSON>

  <FAMILY ID="f1">
    <HUSBAND IDREF="p2"/>
    <WIFE IDREF="p1"/>
    <CHILD IDREF="p3"/>
    <CHILD IDREF="p5"/>
    <CHILD IDREF="p6"/>
    <CHILD IDREF="p8"/>
    <CHILD IDREF="p10"/>
    <CHILD IDREF="p12"/>
  </FAMILY>

  <FAMILY ID="f2">
    <HUSBAND IDREF="p7"/>
    <WIFE IDREF="p6"/>
  </FAMILY>

</FAMILYTREE>

uche.ogbuji@fourthought.com wrote:

> FourThought LLC (http://FourThought.com) announces the release of
>
>                             4XPath 0.7.0
>                       -----------------------
>                       A python implementation
>                     of the W3C's XPath language
>
> 4XPath implements the W3C XPath language for indicating and selecting XML
> document components.
>
> http://www.w3.org/TR/xpath
>
> 4XPath implements the full 4XPath specification.
>
> News
> ----
>
> This is the first public release.
>
> More info and Obtaining 4XPath
> -----------------------------
>
> Please see
>
>         http://FourThought.com/4Suite/4XPath
>
> Or you can download 4XPath from
>
>         ftp://FourThought.com/pub/4Suite/4XPath
>
> 4XPath is distributed under a license similar to that of Python.
>
> --
> Uche Ogbuji
> uche.ogbuji@fourthought.com
> Consulting Member, FourThought LLC
> http://FourThought.com          http://OpenTechnology.org

Received on Thursday, 2 September 1999 09:47:52 UTC