Hello all, just a dummy xpath question.
Could I navigate in XPath through an IDREF to the referenced element. For example: <root> <element1 id="ref"> <element1-child/> </element1> <element2> <element-ref>ref</element-ref> </element2> </root> /root/element2/element-ref/element1-child Or the idref is juts a constraint like a primary key in a database table? Any help, thanks in advance!!
Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
On 6/8/07, victor panizza <[hidden email]> wrote:
> Hello all, just a dummy xpath question. > > Could I navigate in XPath through an IDREF to the referenced element. For > example: > > <root> > <element1 id="ref"> > <element1-child/> > </element1> > <element2> > <element-ref>ref</element-ref> > </element2> > </root> > > /root/element2/element-ref/element1-child > > Or the idref is juts a constraint like a primary key in a database table? > > Any help, thanks in advance!! has to match an id elsewhere in the document. What you are trying to do could be achieved by: /root/element1[@id = /root/element2/element-ref]/element1-child or id( /root/element2/element-ref )/element1-child Note: the second one will only work if the @id is declared as type xs:id [1] [1]: http://www.w3.org/TR/xpath-functions/#func-id -- Daniel E. Renfer http://kronkltd.net/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Thanks Daniel!!!!
It's help me a bunch "Daniel E. Renfer" <[hidden email]> wrote: On 6/8/07, victor panizza wrote:
Don't get soaked. Take a quick peak at the forecast with theYahoo! Search weather shortcut. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |