[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Handling Repeating XML !!


Subject: Re: [xsl] Handling Repeating XML !!
From: George Cristian Bina <george@xxxxxxx>
Date: Mon, 23 Aug 2004 14:39:28 +0300

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
Keywords