[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Problems copying elements recursively.

Subject: Re: Problems copying elements recursively.
From: Imrran Wahid <devguy2003@xxxxxxxxx>
Date: Fri, 7 Feb 2003 08:28:55 -0800 (PST)
wahid yahoo.com
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"?> 
<SomeOutput>
  <Content>
    <Code>2</Code> 
    <ID>6</ID> 
    <TranNum>1</TranNum> 
    <Rqs>
      <Rq>
        <RqLine>3</RqLine> 
        <RqAcct>6</RqAcct> 
      </Rq>
      <Rq>
        <RqLine>5</RqLine> 
        <RqAcct>34</RqAcct> 
      </Rq>
    </Rqs>
  </Content>
  <OtherDetails>
  <Title>Testing</Title> 
  <Type>E</Type> 
  <Time>12.20</Time> 
  </OtherDetails>
</SomeOutput>

Here's my stylesheet:

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

The imported stylesheet can be found
at:http://www.xmlportfolio.com/xml-to-string/

Imrran

> 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
> http://www.xmlportfolio.com/xml-to-string/
> helpful.
> 
> Mike
> 
> -- 
>   Mike J. Brown   |  http://skew.org/~mike/resume/
>   Denver, CO, USA |  http://skew.org/xml/
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.