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

Re: XML tag translation problem

Subject: Re: XML tag translation problem
From: Mike Moran <Mike.Moran@xxxxxxxxxxx>
Date: Tue, 23 Jan 2001 16:48:31 +0000
vlist lite problem
"Snyder, Christopher" wrote:
> 
> Hello everyone.  My apologies in advance for bringing this to the list if in
> fact there is an answer in the archive.  I've searched the xsl-l and xml-l
> archives without finding information enough to sort out what needs done.
> 
> My desired result is, I think, reasonably simple.  I would like to input an
> XML doc with capitalized tags, and have an xsl doc that translates the
> document exactly except for the new xml having lowercased tags, complete
> with lowercased attributes, etc.
> 
> I understand that this involves the use of the identity xsl document.
> 
> The code I'm using looks like this:
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl">
>   <xsl:template match="*">
>     <xsl:element name="{translate(name(),'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
>                                          'abcdefghijklmnopqrstuvwxyz')}">
>        <xsl:apply-templates select="@*|node()"/>
>     </xsl:element>
>   </xsl:template>
> </xsl:stylesheet>
> 
> What I'm getting is, in ie 5.0 with the 3.0 parser added, nothing.  It
> doesn't give an error message, but no DOM tree is displayed either.  In
> XSLDebugger (www.xsldebugger.com) I get nothing displayed in the result
> window, and the parsed XML doc displays in the preview window as having been
> lowercased, but with the attributes left out.

I don't know about the IE thing, but if you want to copy attributes
across then you have to do it explicitly. The XSL you give above only
creates an element, leaving out any attributes.

-- 
Mike.Moran@xxxxxxxxxxx 
                   Web: http://houseofmoran.com/
               AvantGo: http://houseofmoran.com/Lite/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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