Re: [xsl] Problems copying elements recursively.

Subject: Re: [xsl] Problems copying elements recursively.
From: Imrran Wahid <devguy2003@xxxxxxxxx>
Date: Fri, 7 Feb 2003 08:28:55 -0800 (PST)
On a tip from Mike Brown, I imported Evan Lenz's
stylesheet and was able to output the raw xml.
However, the data was not indented like i expected.
Can anyone help with this?

Here's the xml:

<?xml version="1.0" encoding="ISO-8859-1" ?> 
<?xml-stylesheet type="text/xsl" href="testdoc.xsl"?> 

Here's my stylesheet:

  <?xml version="1.0" encoding="ISO-8859-1" ?> 
- <xsl:stylesheet version="1.0"
  <xsl:import href="xml-to-string.xsl" /> 
  <xsl:output method="xml" indent="yes" /> 
- <xsl:template match="/">
- <html>
- <head>
- <!--  Set the background color of the html page 
- <body bgcolor="#B0C4DE">
  <hr /> 
  <h3>The Raw XML for the Content node</h3> 
  <xsl:apply-templates select="//Content" /> 
- <xsl:template match="Content">
- <pre style="color: blue; font-weight: bold;">
  <xsl:call-template name="xml-to-string" /> 

The imported stylesheet can be found


> Simulating the serialization of a node-set to a
> string in XML syntax is an
> arduous process best suited for an extension
> function, but you'll probably
> find Evan Lenz's stylesheet at
> helpful.
> Mike
> -- 
>   Mike J. Brown   |
>   Denver, CO, USA |
>  XSL-List info and archive: 

Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

 XSL-List info and archive:

Current Thread