This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dynamic grouping of tabular data; one or two transformations?


> >   xsl2 = xml.transformNode(xsl1);
> >   html = xml.tranformNode(xsl2);
> 
> But I think that using a two-step transformation where the first
> transformation generates the keys that you use for the second
> transformation is probably more straight-forward in the long run.

Okay I have my two transfomations working properly from a command line
but I am having some difficulty packaging it. Basically I am stuck with 
an XML file with a stylesheet reference in it:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="Group.xsl"?>
<root>
 <row> <A>0</A> <B>0</B> <C>0</C> <D>0</D> </row>
 ...
 <row> <A>1</A> <B>1</B> <C>1</C> <D>1</D> </row>
</root>

In the stylesheet Group.xsl I am attempting to do the two transformations
within msxml script:

  <msxsl:script language="javascript" implements-prefix="user">
  <![CDATA[
   function DoIt(xml,xsl1) {
    xsl2 = xml.transformNode(xsl1.documentElement);
    html = xml.transformNode(xsl2.documentElement);
    return html;
   }
  ]]> 
 </msxsl:script>

<xsl:variable name="result" 
     select="user:DoIt(document(''),document('Group1.xsl'))"/>

Group1.xsl is the styleshet that will generate the stylesheet with 
key definitions in it. I am a little confused if I can proceed like 
this and exactly what type of object the XSLT function document() 
passes to the JavaScript DoIt function. I have never had to do a
transform within JavaScript called from within a stylesheet before.
Can anyone clear this up? Thanks.

__________________________________________________
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]