Re: [xml] wanted: an xpath expression



Sorry to reply to my own mail, but thinking about
the problem I'll restate the goal:

Imagine I have a hierarchy of 'item' elements (such
as in a menu):

<item title="foo">
  <item title="bar">
    <item title="bla"/>
  </item>
  <item title="baz">
    <item title="bla"/>
  </item>
</item>

I'd like to identify individual 'items'. I can't just use
the 'title' attribute, as that may be ambiguous. However, using
the whole path (i.e. a concatenation of all the title attributes
of all parent items) in the tree would work.

THe problem is now how to use that in xslt. I'd like to use
such a structure as the menu for a set of pages, each identifying
itself with one such 'menu item path'. When generating the menu in
the navigation bar, I have to know whether 'this page' is inside
the current 'item', so I can display it unfolded or collapsed.

Is there a way to ask a given 'item' node whether it contains
an item with the so constructed 'id' is 'foo.baz.bla' ?

Thanks,
                Stefan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]