need example of recursive xpath

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

need example of recursive xpath

Jeremiah Jahn-4
Does anyone have an example of a recursive xpath expression? ie. an xpath that can be used in a repeat to walk an entire tree of unknown depth?




--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: need example of recursive xpath

HankRatz

Jeremiah,

I'm not sure what that would look like, as XPath's intent was more to
find specific targets in the document.

If you can pass the document through XSLT, then you can indeed recurse
with templates to ... shred ... the document down to each element.

To traverse either attributes or nodes:

<xsl:apply-templates select="@* | node()"/>

Cheers,
Hank

On Jan 22, 2010, at 3:52 AM, Jeremiah Jahn wrote:

> Does anyone have an example of a recursive xpath expression? ie. an xpath that can be used in a repeat to walk an entire tree of unknown depth?
>
>
>
> --
> 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
> OW2 mailing lists service home page: http://www.ow2.org/wws

Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042







--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: need example of recursive xpath

Erik Bruchez-3
In reply to this post by Jeremiah Jahn-4
Jeremiah,

Not sure if that's what you are looking for, but what about this:

http://wiki.orbeon.com/forms/how-to/edit-hierarchy

-Erik

On Fri, Jan 22, 2010 at 3:52 AM, Jeremiah Jahn <[hidden email]> wrote:

> Does anyone have an example of a recursive xpath expression? ie. an xpath that can be used in a repeat to walk an entire tree of unknown depth?
>
>
>
>
> --
> 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
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: need example of recursive xpath

Jeremiah Jahn-4
thanks, thats what I was looking for. I have to build editors and display tables of content etc. for large nests of elements where I won't know the depth, nor the name of the element. Only once I get to one, I can lookup it's type, and display it or it's input correctly.


On Jan 22, 2010, at 11:02 AM, Erik Bruchez wrote:

> Jeremiah,
>
> Not sure if that's what you are looking for, but what about this:
>
> http://wiki.orbeon.com/forms/how-to/edit-hierarchy
>
> -Erik
>
> On Fri, Jan 22, 2010 at 3:52 AM, Jeremiah Jahn <[hidden email]> wrote:
>> Does anyone have an example of a recursive xpath expression? ie. an xpath that can be used in a repeat to walk an entire tree of unknown depth?
>>
>>
>>
>>
>> --
>> 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
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>
> --
> 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
> OW2 mailing lists service home page: http://www.ow2.org/wws


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws