Subject: Re: [xsl] xsl:element will not create an output element, in any context From: N David Brown <orieldave@xxxxxxxxxxxxxx> Date: Thu, 31 May 2007 22:32:06 +0000 |
xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/XHTML"> <xsl:output method="html"/>
<xsl:template match="/"> <html><head><title></title></head><body> <ul><xsl:apply-templates/></ul> </body></html> </xsl:template>
<xsl:template match="dir"> <li><xsl:value-of select="text()[1]"/> <ul><xsl:apply-templates/></ul>
</li> </xsl:template>
<xsl:template match="file"> <li><xsl:value-of select="text()[1]"/></li> </xsl:template>
<root> <dir> tier00 <dir> tier10 <dir> tier20 <file>file0</file> </dir> </dir> </dir> <dir> tier01 <dir> magic <dir> random <file>anotherFile2</file> <file>anotherFile</file> </dir> </dir> <dir> tier11 <dir> tier21 <file>file1</file> </dir> </dir> </dir> </root>
I just tried this, and it output only the 'value-of's, nothing more... I tried setting output to 'html', 'xml' and not including the tag at all, but nothing produced the UL and LI elements. I'm transforming using my PHP now, as Abel, suggested, and the content is dumped to a text file so there's no worry I'm missing something that's actually there ;)
<xsl:template match="dir"> <li><xsl:value-of select="text()[1]"/> <ul><xsl:apply-templates/></il> </li> </xsl:template>
<xsl:element name="test"> .... </xsl:element>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xsl:element will not crea, N David Brown | Thread | Re: [xsl] xsl:element will not crea, David Carlisle |
Re: [xsl] NFA to DFA conversion usi, Dimitre Novatchev | Date | RE: [xsl] NFA to DFA conversion usi, Michael Kay |
Month |