|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Can I print well-formed XML/HTML in text output mo
Hi > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of > Nathaniel Stoddard > Sent: Sunday, October 26, 2003 7:17 PM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: RE: Can I print well-formed XML/HTML in text > output mode > > > > Well, that didn't work for me. Let me show you a quick XML > and XSLT files so you can see what it is doing for me. That's because you're using text method. Try this: <xsl:template match="*[not(node())]"> <xsl:call-template name="indent"/> <xsl:text><</xsl:text> <xsl:value-of select="name()"/> <xsl:apply-templates select="@*"/> <xsl:text>/> </xsl:text> </xsl:template> <xsl:template match="*[node()]"> <xsl:call-template name="indent"/> <xsl:text><</xsl:text> <xsl:value-of select="name()"/> <xsl:apply-templates select="@*"/> <xsl:text>>$#10;</xsl:text> <xsl:apply-templates/> <xsl:call-template name="indent"/> <xsl:text></</xsl:text> <xsl:value-of select="name()"/> <xsl:text>> </xsl:text> </xsl:template> <xsl:template match="@*"> <xsl:text> </xsl:text> <xsl:value-of select="name()"/> <xsl:text>="</xsl:text> <xsl:value-of select="."/> <xsl:text>"</xsl:text> </xsl:template> <xsl:template name="indent"> <xsl:for-each select="ancestor::*"> <xsl:text> </xsl:text> </xsl:for-each> </xsl:template> Regards, Americo Albuquerque 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
|

Cart








