Subject: RE: [xsl]XMLTag Names becoming titles in html From: "Michael Kay" <mhkay@xxxxxxxxxxxx> Date: Tue, 17 Apr 2001 14:10:38 +0100 |
> I am having the following xml: > <description> Hello </description> > <author> J.Bloggs</author> > <temperature> 37 degrees</temperature> > <soil></soil> > > In my xsl: > I need some way of looping through the xml so that if there > is content (e.g > Hello for description tag) to display the xml element tag's name (e.g > description) as a title in the html along with the content, otherwise > display nothing (as for the soil tag). You mean something like <xsl:for-each select="*[text()]"> <h1><xsl:value-of select="name()"/></h1> <p><xsl:value-of select="."/></p> </xsl:for-each> ? Mike Kay Software AG XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl]XMLTag Names becoming titles i, Tanzila Mohammad | Thread | RE: [xsl]XMLTag Names becoming titl, Tanzila Mohammad |
RE: [xsl] Copying XHTML, Michael Kay | Date | Re: [xsl] Copying XHTML, Ronald |
Month |