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

RE: XMLTag Names becoming titles in html

Subject: RE: XMLTag Names becoming titles in html
From: "Tanzila Mohammad" <tmohammad@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 17 Apr 2001 14:30:56 +0100
xml element tag name
I want my html output to be as follows:

description
Hello

author
J.Bloggs

temperature
37 degrees

So the tag name is the heading with the value underneath. Also since soil
was empty then this tag would not be displayed. I have tried the code below
and i don't think it is what i want - or at least i think it's not.

Tanz

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Michael Kay
Sent: 17 April 2001 14:11
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: XMLTag Names becoming titles in html


> 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




 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.