Subject: Re: [xsl] presenting xml elements as they appear in the source file From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Tue, 27 Apr 2010 14:21:52 -0400 |
<xsl:template match="*"> <span class="tag"> <xsl:text><</xsl:text> <xsl:value-of select="name()"/> <xsl:text>></xsl:text> </span> <xsl:apply-templates/> <span class="tag"> <xsl:text></</xsl:text> <xsl:value-of select="name()"/> <xsl:text>></xsl:text> </span> </xsl:template>
Cheers, Wendell
Hello,
In general can anyone suggest how to display xml nodes as they appear in the source file?
If there is an easy way of doing this it will assist with this problem:
I'd like to use xsl to prepare an html document but at certain points the xml becomes an arbitrary mix of nodes, think of a number of a number of legal/valid elements that can be arranged in arbitrary ways, such as a nested query.
Since the composition of the query is unpredictable it is necessary to just present the nodes as they are in the source xml, complete with the < > brackets, to make things easy.
I see that there are examples of presenting xml in trees and that may be a bit time consuming for a beginner to implement so simply listing the elements verbatim is fine for now.
Thank you
Rod
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] presenting xml elements as th, Rod Kane | Thread | RE: [xsl] presenting xml elements a, Michael Kay |
[xsl] presenting xml elements as th, Rod Kane | Date | RE: [xsl] presenting xml elements a, Michael Kay |
Month |