[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] how to deal with uncertain node name in xsl?
Subject: Re: [xsl] how to deal with uncertain node name in xsl? From: "glliu" <itslgl@xxxxxxxxxxx> Date: Fri, 22 Nov 2002 16:22:03 +0800 |
thanks a lot for your time. As you said,when a node name is unknown,* would work. it's such a simple problem,i am a newcomer. ----- Original Message ----- From: <Jarno.Elovirta@xxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Friday, November 22, 2002 3:33 PM Subject: RE: [xsl] how to deal with uncertain node name in xsl? > Hi, > > > I need help on the following problem. Any suggestions? > > > > Thanks in Advance. > > > > glliu > > > > > > xml file: I do not know the sub node name and number of > > <A>,how can i convert the xml to html in xsl? > > > > <A> > > <..>node value</..> > > <...>node value</...> > > <....>node value</...> > > ...... > > ...... > > </A> > > Could you show us your desired output? Since > > <xsl:template match="/"> > <html> > <head><title>foo</title></head> > <body> > <xsl:apply-templates select="decendant::A" /> > </body> > </html> > </xsl:template> > > <xsl:template match="A"> > <ul> > <xsl:for-each select="*"> > <li> > <xsl:value-of select="." /> > </li> > </xsl:for-each> > </ul> > </xsl:template> > > would transform the input into HTML, but probably not the kind you want. Anyhow, if you didn't know how to match an element without knowing it's name, use * and see <http://localhost/tr/xpath/#node-tests>. > > Cheers, > > Jarno > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] how to deal with uncertai, Jarno . Elovirta | Thread | [xsl] The beginning of xslt?, Jarkko Moilanen |
RE: [xsl] string processing, Jarno . Elovirta | Date | [xsl] How to apply xsl on the clien, Tomas . Oberg |
Month |
Keywords