[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Turning off 'well-formedness'
Richard,
The classic solution to your problem would pick up every third <Record> and group its next two siblings with it, along the lines of: <xsl:template match="Record"> <xsl:if test="(count(preceding-sibling::Record) mod 3) = 1"> <!-- works on first, fourth, seventh Records, etc. --> <td> <xsl:apply-templates/> <br/> <xsl:for-each select="following-sibling::Record(position() < 3)"> <!-- picks up the next two Records --> <xsl:apply-templates/> <br/> </xsl:for-each> </td> </xsl:if> </xsl:template> You say you want a <br> after every entry; but you can see here it's easy enough to put one just before 2nd and 3rd rows, not after each. Also, you can see how easy it is to parameterize this: just change the number '3' into a parameter to make bigger or smaller groups. Don't try to 'turn off well-formedness' -- the language is built to work with it, not without it. Whenever you think it's in the way, it's probably because your approach to the problem isn't XSL-ish enough. Cheers, Wendell At 04:20 PM 1/9/02, you wrote: Folks, ====================================================================== 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 ====================================================================== XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|