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

RE: Re: xsl-list Digest 22 Mar 2005 06:10:01 -0000 Iss

Subject: RE: Re: xsl-list Digest 22 Mar 2005 06:10:01 -0000 Issue 364
From: "Boopathi Rajan" <boopsraj@xxxxxxxxx>
Date: Wed, 23 Mar 2005 13:09:35 +0530
boopathi
Hi kumar,
try this xsl, hope this works...

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/">
		<html>
			<head>
				<title>title</title>
			</head>
				<body>
					<xsl:call-template name="main"/>
				</body>
		</html>
	</xsl:template>
	<xsl:template name="main">

	<xsl:for-each select="webapps/applications/application">
	   <xsl:variable name="curid" select="id" />

		   <xsl:for-each select="users/user">
		     id=<xsl:value-of select="$curid" /><br/>
		     name=<xsl:value-of select="name" /><br/>
		     <xsl:value-of select="accessrestrictions" /><br/>
		   </xsl:for-each>
	</xsl:for-each>
	</xsl:template>
</xsl:stylesheet>

Refards
Boopathi Rajan

-----Original Message-----
From: Kumar S [mailto:kumar.subscriptions@xxxxxxxxx]
Sent: Tuesday, March 22, 2005 8:29 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Re: xsl-list Digest 22 Mar 2005 06:10:01 -0000 Issue 364


Hi Friends,
I'm having an xml as follows
        <webapps>
          <applications>
            <application>
                <name>Application1</name>
                <id>1</id>
                <users>
                    <user>
                        <name>Arjun</name>
                        <accessrestrictions>some text</accessrestrictions>
                    </user>
                    <user>
                        <name>user2</name>
                        <accessrestrictions>some text</accessrestrictions>
                    </user>
                    <user>
                        <name>user3</name>
                        <accessrestrictions>some text</accessrestrictions>
                    </user>
                    <user>
                        <name>user4</name>
                        <accessrestrictions>some text</accessrestrictions>
                    </user>
                </users>
            </application>
            <application>
		    <name>Application2</name>
		    <id>2</id>
		    <users>
			<user>
			    <name>arjun</name>
			    <accessrestrictions>some text</accessrestrictions>
			</user>
			<user>
			    <name>sruthi</name>
			    <accessrestrictions>some text</accessrestrictions>
			</user>
		    </users>
            </application>
          </applications>
	</webapps>

I'm trying to list the name,id and then all the users for the
application using xsl
	<xsl:for-each select="webapps/applications/application">
	   <xsl:variable name="curid" select="id" />
	   <xsl:for-each select="webapps/applications/application/users/user">
	     <xsl:value-of select="$curid" />
	     <xsl:value-of select="name" />
	     <xsl:value-of select="accessrestrictions" />
	   </xsl:for-each>
	</xsl:for-each>

But the above code does not work. can anybody help me.

Thanks in advance

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.