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

Re: RE: XML to HTML

Subject: Re: RE: XML to HTML
From: "Joris Gillis" <roac@xxxxxxxxxx>
Date: Tue, 20 Sep 2005 11:04:40 +0200
Re:  RE:  XML to HTML
Hi,
Tempore 10:03:45, die 09/20/2005 AD, hinc in xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Shailesh Shinde <shailesh@xxxxxxxxxxxx>:

By using below tempalte I am get the output but with some other content
which i don't want. I have to display TopicGroup title in h1 and the rest of
the child element src values in h2 under that particular topicgroup.

Maybe you want the output to be:


<h1>Topic Group Title</h1>
<h2>Topic Title</h2>
<h2>Topic Title</h2>
<h2>Topic Title</h2>
<h1></h1>

In that case, try this stylesheet:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>

<xsl:template match="qxf">
	<xsl:apply-templates select="docmain/Chapter/TopicGroup"/>
</xsl:template>

<xsl:template match="TopicGroup">
	<h1><xsl:value-of select=".//src"/></h1>
	<xsl:apply-templates select="Topic"/>
</xsl:template>

<xsl:template match="Topic">
	<h2><xsl:value-of select="Title//src"/></h2>
</xsl:template>

</xsl:stylesheet>


regards, -- Joris Gillis (http://users.telenet.be/root-jg/me.html) Don't send spam. I don't like it and it is illegal.

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.