Subject: Re: [xsl] Re:Generating table rows... selecting a run of empty elements From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Mon, 14 Feb 2005 15:30:16 -0500 |
Your example is a fine way to break the table into rows, but I am still left with the core problem:
How do I select a run of emptpy elements for processing into a table with rows?
I.e. I have
<photo title="9 jo kesa with Sanskrit A" file="Daimonji.023.jpg"> This robe was found in 1955 after ... end of description. </photo>
<photo title="hand bell from Hondo" file="Daimonji.024.jpg"/> <photo title="hand bell from Hondo" file="Daimonji.025.jpg"/> <photo title="hand bell from Hondo" file="Daimonji.026.jpg"/> <photo title="hand bell from Kaisando" file="Daimonji.027.jpg"/> <photo title="hand bell from Sanmon" file="Daimonji.028.jpg"/> <photo title="hand bell from Hondo" file="Daimonji.029.jpg"/>
<photo title="9 jo kesa with Ring TieA" file="Daimonji.032.jpg"> Very fine condition linen robe. The carved box ... end of description. </photo>
And I want to apply table processing to that central run of 6 elements, making a table of one and a half rows of four each. The elements with paragraphs of text are handled in a different way. I can select the first empty <photo ../> element with
<xsl:template match="photo[not(text())][preceding-sibling::photo[1][text()]]">
But how do I assign that and the following 5 elements to a variable, with which I can then call the "rowsof4" template?
I think I want something like the following, but it fails with the "wrong number of arguments".
<xsl:with-param name="nodes" select=". | following-sibling::photo[not(text())][position() <position(following-sibling::photo[text()][1])]"/>
<a/> <b/> <b/> <b/> <a/> <b/> <b/> <b/> <b/> <a/> <b/>
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re:Generating table rows... s, david | Thread | [xsl] CDATA again, Robert Soesemann |
Re: [xsl] Understanding Identity Tr, Joris Gillis | Date | [xsl] Latin Stuff (OT and was Re: [, JBryant |
Month |