Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: need help from xsl guru

From: ezhou@----.-- (----)
To: NULL
Date: 11/1/2004 1:47:00 PM
Hi,Joris:

I checked the html output. it is still a little bit different than I thought.

How can we have something like: 

p1 1000
   c1 1001
   c2 1002
p2 2000
   c3 2001
p3 3000


thanks.

Eric


"Joris Gillis" <roac@p...> wrote in message news:<opsgobo7k5yf9v9r@n...>...
> > I would like to simply show a html which indicates the parents and
> > children relationship for each parent in my xml.
> >
> 
> Hi,
> 
> Perhaps you are looking for something like this:
> 
> <?xml version="1.0" ?>
>   <xsl:stylesheet
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>   version="1.0">
> 
>   <xsl:output method="html" indent="yes"/>
> 
> <xsl:template match="parents">
> <html>
> <head/>
> <body>
> <ul>
>    <xsl:apply-templates mode="2html"/>
> </ul>
> </body>
> </html>
> </xsl:template>
> 
> <xsl:template match="*" mode="2html">
> <li>
> <span style="color:blue"><xsl:value-of select="local-name()"/></span>
> <ul>
>    <xsl:apply-templates select="node()" mode="2html"/>
> </ul>
> </li>
> </xsl:template>
>   </xsl:stylesheet>
> 
> regards,


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent