Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: hieratical xml transformation [Thread Next] Re: hieratical xml transformationTo: NULL Date: 6/6/2007 11:26:00 AM
I was wrong, sorry, it does work. Thanks
"delirio" <migdemelo@g...> wrote in message
news:1181143254.225646.185460@q......
> On Jun 6, 3:34 pm, "Mark Goldin" <mgol...@ufandd.com> wrote:
>> I have an xml file that is an attribute based. That file has hieratical
>> structure.
>> Here is a sample of it:
>> <?xml version="1.0" encoding="windows-1252"?>
>> <menu name1="test1" name2="test2">
>> <menu name1="test1" name2="test2"></menu>
>> <menu name1="test3" name2="test4"></menu>
>> <menu name1="test5" name2="test6">
>> <menu name1="test7" name2="test8"></menu>
>> <menu name1="test9" name2="test10"></menu>
>> </menu>
>> </menu>
>>
>> Is it possible to transform it into another xml but element based?
>>
>> Thanks
>
>
> <xsl:template match="menu">
> <menu>
> <xsl:apply-templates select="@*"/>
> <xsl:apply-templates select="menu"/>
> </menu>
> </xsl:template>
>
> <xsl:template match="@*">
> <xsl:element name="{name()}">
> <xsl:value-of select="."/>
> </xsl:element>
> </xsl:template>
>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
