Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: xslt

From: "Dennis Myrén" <dennis@------.-->
To: NULL
Date: 4/7/2005 12:25:00 PM
Try something like:
 <xslt:template match="tag">
      <xslt:element name="{@attrib}">
           <xslt:value-of select="tag2/@attribute" />
      </xslt:element>
 </xslt:template>

You call this template like this:
<xslt:apply-templates select="/tag" />

-- 
Regards,
Dennis JD Myrén
Oslo Kodebureau
"debugger" <jsdebugger@y...> wrote in message 
news:1112867218.701291.228970@f......
> Hi,
> I have an xml source of the following type:
> <tag attrib="val1">
>      <tag2 attribute="something" />
> </tag>
> <tag attrib="val2">
>      <tag2 />
> </tag>
> <tag attrib="val3">
>      <tag2 attribute="zzz" />
> </tag>
> <tag1 attrib="val4">
>      <tag2 attribute="abc" />
> </tag>
> .......
>
> I want to use xsl transform of this xml source into:
>
> <val1>something</val1>
> <val2></val2>
> <val3>zzz</val3>
> <val4>abc</val4>
>
>
> Any suggestions are highly appreciated.
> Thanks
> 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent