Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: need help from xsl guru >Thread Next - Re: need help from xsl guru Re: need help from xsl guruTo: 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, | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
