RE: [xsl] dynamic grouping of tabular data; one or two transformations?

Subject: RE: [xsl] dynamic grouping of tabular data; one or two transformations?
From: Dan Diebolt <dandiebolt@xxxxxxxxx>
Date: Sat, 24 Nov 2001 16:11:40 -0800 (PST)
I am integrating my "dynamic grouping"  stylesheets into Chris'
<msxsl> solution and I am finding two immediate problems.

Here is a fragment from the output of the first stylesheet:

  <?xml version="1.0" encoding="UTF-16"?>
    xmlns:xsl=""; version="1.0"?>
  <xsl:key name="KeyA" match="row" use="A"
    xmlns:xsl=""; />
  <xsl:key name="KeyB" match="row" use="B"
    xmlns:xsl=""; />

Q1) I can't seem to specify the output encoding to UTF-8 or Windows-1252.
    It always shows up at UTF-16 despit my definition:

   <xsl:output method="xml" indent="yes" encoding="UTF-8"/>

Q2) I am getting default namespaces raining down on all of my elements:


    When the code to generate the keys has no such references to such
    an attribute:

<xsl:param name="GroupBy" select="'A B'"/>
<xsl:call-template name="GenKeys">
  <xsl:with-param name="GroupBy" select="$GroupBy"/>
 <xsl:template name="GenKeys">
  <xsl:param name="GroupBy"/>
  <xsl:variable name="nlist" select="concat(normalize-space($GroupBy),' ')"/>
  <xsl:variable name="head" select="substring-before($nlist,' ')"/>
  <xsl:variable name="tail" select="substring-after($nlist,' ')"/> 
  <xsl:element name="xsl:key">
   <xsl:attribute name="name">Key<xsl:value-of select="$head"/></xsl:attribute>
   <xsl:attribute name="match">row</xsl:attribute>
   <xsl:attribute name="use"><xsl:value-of select="$head"/></xsl:attribute>
  <xsl:if test="$tail">
   <xsl:call-template name="GenKeys">
    <xsl:with-param name="GroupBy" select="$tail"/>

Any help would be appreciated.

Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.

 XSL-List info and archive:

Current Thread