[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Transform all tags into attributes with some tags
Philipp Kursawe schrieb:
wonderful! This works! How can I ommit empty tags? They should not be converted to attributes.
<xsl:template match="*[ . = '' ]" mode="attr"/><!-- empty --> Note this presupposes you do not have any child elements attached to the element nodes matched by the above template, not to mention attributes and other children. If, however, you do, then you must ensure processing continues in the same mode by nesting: <xsl:apply-templates select="*" mode="attr"/> or: <xsl:apply-templates select="node()|@*" mode="attr"/> And, of course, you'll have to set up templates accordingly. Michael Ludwig
|
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
|