Re: XPath display multiple elements in one table question
I found out my grouping lsa-tubes into a table code is not complete.
I am confused on how to select all following-siblings after I find the
1st in the group. The table starts correctly for each group of
lsa-tubes, but then it only adds the next following lsa-tube. How do
I select the rest of the following-sibling lsa-tubes in the group? It
looks like I have to make this recursive somehow.
Here's my code.
My for-each only selects the next following lsa-tube in the group.
How do I change this to select all following in a group? This grouping
in XPath seems hard.
Any help is greatly appreciated.
--- In XSL-FO@yahoogroups.com, "odekij61" <odekij61@y...> wrote:
> I found the answer to my question in grouping chapter in my "XSLT
> XPath on the Edge" book.
> To match the 1st lsa-tube in an adjacent set I matched this:
> To match the rest and not display them I did this:
> <xsl:template match="lsa-tube[preceding-sibling::*
> Summary.... I find the 1st lsa-tube and create a table, and then
> inside that template I find the rest and add rows. I then created a
> template that does not display anything for the non 1st lsa-tubes.
> This allows me to create one table when multiple lsa-tubes are in a
> Hope this helps other people.
> Jeremy Odekirk
> --- In XSL-FO@yahoogroups.com, "odekij61" <odekij61@y...> wrote:
> > Hello,
> > I have an element lsa-tube, that can be at many different levels
> > xml hierarchy. I need to display the lsa-tubes in one table if
> > immediately after each other in document order. I think to do
> > have to match lsa-tube and start a table, and do a for-each
> > following-direct-siblings append table rows. What's the XPath to
> > match a bunch of lsa-tubes directly after the current until a
> > non-lsa-tube element?
> > I am sure I read how to create tables with variable amount of rows
> > somewhere, but I cannot find it in my books, or online.
> > Any help/links are greatly appreciated.
> > Thanks,
> > Jeremy Odekirk