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

Re: template to convert all attributes' name to lowerc

Subject: Re: template to convert all attributes' name to lowercase
From: Vyacheslav Sedov <vyacheslav.sedov@xxxxxxxxx>
Date: Thu, 28 May 2009 10:38:54 +0400
Re:  template to convert all attributes' name to lowerc
xmlns:xsl="http://www.w3.org/TR/WD-xsl" - it is very old stuff you
should try xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

    <xsl:template match="*">
        <xsl:element name="{lower-case(local-name(.))}"
            <xsl:apply-templates select="@*"/>

    <xsl:template match="@*">
        <xsl:attribute name="{lower-case(local-name(.))}" >
            <xsl:value-of select="."/>


On Thu, May 28, 2009 at 8:10 AM, Heping Zhang <phoenix.zhp@xxxxxxxxx> wrote:
> hello,
> I hava a task to convert all attributes' name in a xslt file to
> lowercase. Actually I don't know whether it's a xslt file. It looks
> strange, like this:
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
>        <xsl:template match=" / ">
>                <HTML>
>                        <BodY bgColor="#c0c0c0" Class="screen"
> id="FNSScreen">
>                        //many html things go here.
>                        </BodY>
>                </HTML>
>        </xsl:template>
> </xsl:stylesheet>
> I don't know why the html pretend itself as a xslt.
> I'm a novice of  xslt and have only two days to finish this task.
> First I think its a simple thing but it seems not. But maybe its a
> common task? So I wonder whether there is a template for this? If so,
> could you please send me a copy? Thank you!
> If there's no such template, I'll try my best to do it.

Current Thread


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.
First Name
Last Name
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.