[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xsl:element will not create an output element, in
Ok, back from work now, so have had time to test =D
@Abel - I tried running your Hello World test, and it worked fine =) I took note of your 'need an html, title... element in the output' comment, and tried using this - 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> </xsl:stylesheet> - to transform this -
- but it didn't work. Still no elements were output; only the 'value-of's. @David - David Carlisle wrote: 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 ;) Additionally, I tried this latest example with 'xml version="2.0"' declared, but to no avail, regardless of 'html/xml' output attribute value. I also tried all of these tests with this elemented wrapped around the dir template's contents: <xsl:element name="test"> .... </xsl:element> As I said before, I'm viewing the direct, dumped output, so I'm not just failing to observe something that's actually there, I don't think... So guys, you see why I'm stumped! What should I try next? - Dave
|
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
|