Subject: Re: [xsl] Generic stylesheet to flatten XML hierarchy From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Thu, 03 Dec 2009 14:31:53 -0500 |
I've been wandering through the archives and other searches and so far have not found exactly what I am hoping to find. I need to write an XSLT stylesheet that accepts an unknown XML document and flattens the hierarchy to a two-dimensional row/columns structure.
I know the basics, especially when you know the input structure, but this has to be completely generic. The input document may have any level of repeating node sets, including none. I believe we can ignore (at least for the moment) mixed content. I'm getting stuck on the logic to handle the issue of any level of repeating nodes.
Does anyone know of an example of anything approaching this?
<xsl:template match="*"> <xsl:copy> <xsl:apply-templates select="text()"/> </xsl:copy> <xsl:apply-templates select="*"/> </xsl:template>
Cheers, Wendell
====================================================================== 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] Generic stylesheet to flatten, Sara Mitchell | Thread | Re: [xsl] Generic stylesheet to fla, G. Ken Holman |
Re: [xsl] trouble looping using xsl, Martin Honnen | Date | Re: [xsl] Generic stylesheet to fla, G. Ken Holman |
Month |