This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: static vars or how to write dirty tags
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] static vars or how to write dirty tags
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Thu, 25 Oct 2001 12:20:37 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> <xsl:if test="count(following-sibling::column) = 0">
> </tr><tr> <!-- :-) well, thats what I want to do ... -->
> </xsl:if>
>
> Sometimes I think xml could be more flexible ... the output would be
> clean html ... :-)
>
It's not so much that XML doesn't allow this, it's that you've misunderstood
the XSLT processing model, which is based on the idea of nodes in trees.
A tr node in the stylesheet, when processed, causes a tr node to be added to
the result tree. You add nodes to the result tree, not tags, so you can't
add start tags and end tags as independent operations.
Rethink your problem. What part of the input do you want to process in order
to produce a tr node in the output? Write a template rule to grab this
amount of input, and process it as a unit.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list