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

RE: [xsl] How to get element name for output


Subject: RE: [xsl] How to get element name for output
From: "Chaudhary, Harsh" <HCHAUDHA@xxxxxxxxx>
Date: Wed, 6 Jun 2007 16:41:33 -0500

That works too...just for reference, this is what I just figured out:

......
<xsl:element name="attribute"><xsl:attribute name="type"><xsl:value-of
select="local-name(attributeMap/child::*)"/></xsl:attribute>
......

Thanks,
Harsh.

-----Original Message-----
From: David Carlisle [mailto:davidc@xxxxxxxxx]
Sent: Wednesday, June 06, 2007 4:39 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] How to get element name for output



name()

used for example as


<foo type="{name()}"/>

David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________

Hi,

I am writing XSLt (ver 1.0) for output to an XML file. At one point I
would like to get the name of the element and include that in the
output. An example would be:

Input XML:

<rootElement>
        <productAttributeList>
            <attributeMap>
                <ReinstatementInProc>N</ReinstatementInProc>
            </attributeMap>
            <elementName>attribute</elementName>
        </productAttributeList>
</rootElement>

Output XML:

<rootElement>
    <attribute type="ReinstatementInProc">N</attribute>
</rootElement>

I would really appreciate your help on this.

Thanks,
Harsh.


Current Thread
 
© 2002-2008 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy
This website was created & generated with <oXygen/> XML Editor
Keywords