Hi Chris
For your second point, you can use the translate() and name() functions to
do this. Here's a stylesheet that starts with the Identity transform (lots of
posts about this in this group), adds in another template that matches
elements, then translates the lower case letters to upper case. If you are
working with languages other than English, then you would need to expand the
list appropriately...
HTH
Nigel Armstrong
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="
http://www.w3.org/1999/XSL/Transform" >
<xsl:template match="/ | @* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="*">
<xsl:element name="{translate(name(), 'abcdefghijklmnopqrstuvwxyz',
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'}">
<xsl:apply-templates select="@* | node()"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
[quoted text, click to view] "Chris" wrote:
> Hi,
>
> I have an XML-file :
> <book>
> <title>Alaska</title>
> </book>
>
> I would like transfer the <book>-elements to <bookname> using an xsl-sheet,
> thus producing xml-again. and saving the output in a new xml-file
>
> how can I achieve this ? I don't know how to setup my select-statements
> (????) :
>
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"> > <xsl:template match="/">
> <xsl:for-each select=???? >
> <xsl:value-of select=???? />
> </xsl:for-each>
> </xsl:template>
> </xsl:stylesheet>
>
> another question : is there a way to transform element-tags to uppercase ?
>
> thnx
>
> Chris
>
>