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

Re: Handling Repeating XML !!

Subject: Re: Handling Repeating XML !!
From: George Cristian Bina <george@xxxxxxx>
Date: Mon, 23 Aug 2004 14:39:28 +0300
xml repeating
Hi Raj,

You should get more or less that output if you pass you XML through an empty stylesheet.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"></xsl:stylesheet>


If you want to get something that rendered will look as you presented the output in your email then you can use:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:fmp="http://www.filemaker.com/fmpxmlresult">


	<xsl:template match="/">
		<html>
			<head><title></title></head>
			<body>
				<xsl:apply-templates select="*"/>
			</body>
		</html>		
	</xsl:template>
	
	<xsl:template match="text()">
		<xsl:if test="normalize-space(.) != ''">
			<xsl:value-of select="."/><br/>
		</xsl:if>		
	</xsl:template>
	
</xsl:stylesheet>

If that does not help you try to provide more details on the output you are expecting.

Best Regards,
George
-----------------------------------------------
George Cristian Bina
<oXygen/> XML Editor & XSLT Editor/Debugger
http://www.oxygenxml.com

rajasekhar v wrote:
All,

I have the following XML,

<?xml version="1.0" encoding="UTF-8" standalone ="yes"?>
<A>
 <B>
   <Data1>Data11</Data1>
 </B>
 <C>
   <Data2>Data21</Data2>
 </C>
 <D>
   <Data3>Data31</Data3>
 </D>
 <B>
   <Data1>Data12</Data1>
 </B>
 <C>
   <Data2>Data22</Data2>
 </C>
 <D>
   <Data3>Data32</Data3>
 </D>
</A>

Basically, the sets of B,C,D keep repeating inside the common root tag A. And I want it to be displayed as the following in HTML:

Data11
Data21
Data31
Data12
Data22
Data32

Am not able to find any XSL example that would help me to do the same. Please help me out if any of you already have such an example worked out or know the trick to do it, since this is very important for me now.

Thanks and Regards,
Raj

_________________________________________________________________
Claim your Citibank Ready Cash today. http://go.msnserver.com/IN/54177.asp Its fast, easy and affordable.

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.