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

RE: dynamic grouping of tabular data; one or two trans

Subject: RE: dynamic grouping of tabular data; one or two transformations?
From: Dan Diebolt <dandiebolt@xxxxxxxxx>
Date: Sat, 24 Nov 2001 16:11:40 -0800 (PST)
key ab sat
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"?>
  <?xml-stylesheet 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"?>
  <xsl:key name="KeyA" match="row" use="A"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" />
  <xsl:key name="KeyB" match="row" use="B"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" />

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:

    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 

    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:call-template> 
...
 <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:element>
  <xsl:if test="$tail">
   <xsl:call-template name="GenKeys">
    <xsl:with-param name="GroupBy" select="$tail"/>
   </xsl:call-template>
  </xsl:if>
 </xsl:template>

Any help would be appreciated.

__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

 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.