Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Creating a dynamic element name from one of its children elements >Thread Next - Re: Creating a dynamic element name from one of its children elements Re: Creating a dynamic element name from one of its children elementsTo: NULL Date: 12/12/2007 10:01:00 AM On Dec 12, 7:15 am, Martin Honnen <mahotr...@yahoo.de> wrote:
> brc wrote:
> > I want to set the name of an element to the value of one of its child
> > elements (the 'name' element) in a XSL stylesheet. See below.
>
> > <xsl:template match="ns:well">
> > <xsl:element name="{?????}">
> > <ns:name><xsl:value-of select="ns:name"/><ns:name>
> > <ns:wellType><xsl:value-of select="ns:wellType"/>
> > .
> > .
> > .
> > </xsl:element>
> > </xsl:template>
>
> > So what do I need to substitute for the ????? so that the elements
> > name will be set to
> > the name of the "name" element it includes?
>
> There is a function named 'name' so
> <xs:element name="{name(ns:name)}">
> might do what you want, on the other hand I am not sure why xsl:element
> is needed if you know the name you want.
>
> --
>
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/- Hide quoted text -
>
> - Show quoted text -
Actually I am looking fore the text value of the name element. How
would I get that?
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
