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

Re: Creating list using xslt

Subject: Re: Creating list using xslt
From: "Vasu Chakkera vasucv@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 19 Nov 2014 21:14:41 -0000
Re:  Creating list using xslt
<xsl:template match="Employee">
                <ArrayOfstringVariable
xmlns="http://schemas.abc.org/2004/07/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                        <xsl:for-each select="*">
                                <stringVariable>
                                        <name>
                                                <xsl:value-of select="name()"/>
                                        </name>
                                        <value>
                                                <xsl:value-of select="."/>
                                        </value>
                                </stringVariable>
                        </xsl:for-each>
                </ArrayOfstringVariable>
        </xsl:template>

On 19 November 2014 15:39, jaya k jayak_36@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> Hi All,
>
>
> I have below xml
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Employee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
> <FirstName>John</FirstName>
> <LastName>Peter</LastName>
> <Initial>T</Initial>
> </Employee>
>
> I want to write an xslt to output below xml from the xml above, can anyone
> help to me write this xslt?
>
> <?xml version="1.0" encoding="UTF-8"?>
> <ArrayOfstringVariable xmlns="http://schemas.abc.org/2004/07/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <stringVariable>
> <name>FirstName</name>
> <value>John</value>
> </stringVariable>
> <stringVariable>
> <name>LastName</name>
> <value>Peter</value>
> </stringVariable>
> <stringVariable>
> <name>Initial</name>
> <value>T</value>
> </stringVariable>
> </ArrayOfstringVariable>
> Thanks in advance
>
> XSL-List info and archive
> EasyUnsubscribe (by email)



-- 
Vasu Chakkera
NodeLogic Limited
Oxford
www.node-logic.com
==============

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.