[xsl] XML tag translation problem

Subject: [xsl] XML tag translation problem
From: "Snyder, Christopher" <SnyderC@xxxxxxx>
Date: Tue, 23 Jan 2001 11:26:37 -0500
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.

http://www.mulberrytech.com/xsl/xsl-list/processor-version.xsl tells me that
I have:
Vendor: Microsoft 
Processor version: Original IE5 (or old version of other processor)
However I have downloaded msxml ver 3.0 from Microsoft, and installed it in
replace mode.  (I've actually done this several times now.)
    I'm not sure if I have failed to set up my software properly, if there
is something very basic that I have simply failed to understand, or if I
have an error (errors?) in my code.

Any assistance that can be rendered would be most appreciated.
Chris Snyder




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


Current Thread