RE: [xsl] please help, xsl transformation trouble

Subject: RE: [xsl] please help, xsl transformation trouble
From: "Chris Bayes" <Chris@xxxxxxxxxxx>
Date: Mon, 9 Jul 2001 17:01:58 +0100
You aren't in replace mode

XML/XSL Portal
http://www.bayes.co.uk/xml


>-----Original Message-----
>From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Kyle Polillo
>Sent: 09 July 2001 16:53
>To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
>Subject: RE: [xsl] please help, xsl transformation trouble
>
>
>Chris ,
>
>Thank you for the response. I am however receiving an error from you
>tuturial. I am running msxml2 in replace mode and receive the following
>error when i hit the button on the tutorial page.
>
>keyword xsl:call-template may not be used here
>
>If you wouldn't mind just telling me what the problem is in my code I would
>greatly appreciate it.
>
>Thank you ,
>
>
>Kyle Polillo
>
>
>-----Original Message-----
>From: Chris Bayes [mailto:Chris@xxxxxxxxxxx]
>Sent: Monday, July 09, 2001 11:19 AM
>To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>Subject: RE: [xsl] please help, xsl transformation trouble
>
>
>Kyle,
>There are many things wrong here. Have a look at my site
>http://www.bayes.co.uk/xml/index.xml?/xml/tutorial/filtering/filter.xml
>for an example on how to do this.
>
>Ciao Chris
>
>XML/XSL Portal
>http://www.bayes.co.uk/xml
>
>
>>-----Original Message-----
>>From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>>[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Kyle Polillo
>>Sent: 09 July 2001 16:06
>>To: 'XSL-List@xxxxxxxxxxxxxxxxxxxxxx'
>>Subject: [xsl] please help, xsl transformation trouble
>>
>>
>>Hello all ,
>>
>>I am new to xml/xsl and I am trying to make a page that sorts the
>data in a
>>row by clicking on the column headline. Something happens and the xsl is
>>transformed but not correctly, I just end up with a blank page. Any help
>>would be appreciated.
>>
>>here is the code:
>>
>><?xml version='1.0'?>
>><xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl";>
>><xsl:template match="/">
>><HTML>
>><HEAD>
>><TITLE>test</TITLE>
>>
>>	  <STYLE>
>>
>>		  BODY       { margin:0px; background-color: blue; width:
>>30em;
>>                       font-family: Arial, Helvetica, sans-serif;
>>font-size:
>>small; }
>>          H1         { color: #888833; }
>>          P          { margin-top: .5em; margin-bottom: .25em; }
>>          HR         { color: #888833; }
>>          .cell      { text-align: center; font-size: xx-small;
>margin-top:
>>.25em; background-color: #FFFFDD; }
>>          .headline  { font-style: italic; font-size: xx-small;
>>cursor:hand;
>>color: #FFFFDD ; text-align: center; background-color: blue; border:1px
>>outset white }
>>          .body      { text-align: justify; background-color: #FFFFDD; }
>>          .dingbat   { font-family: WingDings; font-style: normal;
>>font-size: xx-small; }
>>          .id    	 { font-weight: bold; }
>>          .self      { font-style: italic; }
>>
>>
>>         </STYLE>
>>
>></HEAD>
>>
>>	   <SCRIPT><xsl:comment><![CDATA[
>>
>>	   function sort(field)
>>	   {
>>          sortField.value = field;
>>          <!-- set cursor to watch here? -->
>>          document.innerHTML =
>>source.documentElement.transformNode(stylesheet);
>>       }
>>
>>      ]]></xsl:comment></SCRIPT>
>>
>>      <SCRIPT for="window" event="onload"><xsl:comment><![CDATA[
>>        stylesheet = document.XSLDocument;
>>        source = document.XMLDocument;
>>        sortField = document.XSLDocument.selectSingleNode("//@order-by");
>>
>>
>>
>>	   ]]></xsl:comment></SCRIPT>
>>
>>
>>  <BODY>
>>
>>
>>    <P class="cell">click on any column header to sort data :)</P>
>>	<TABLE>
>>	<TR>
>>	<TD><xsl:apply-templates select="fields"/></TD>
>>	</TR>
>>	</TABLE>
>>    <TABLE border="0" cellspacing="1">
>>      <THEAD>
>>        <td bgcolor="#000000"><DIV class="headline"
>>onClick="sort('CustomerID')">CustomerID</DIV></td>
>>        <td bgcolor="#000000"><DIV class="headline"
>>onClick="sort('ContactFirstName')">FirstName</DIV></td>
>>        <td bgcolor="#000000"><DIV class="headline"
>>onClick="sort('ContactLastName')">LastName</DIV></td>
>>		<td bgcolor="#000000"><DIV class="headline"
>>onClick="sort('BillingAddress')">Address</DIV></td>
>>		<td bgcolor="#000000"><DIV class="headline"
>>onClick="sort('City')">City</DIV></td>
>>		<td bgcolor="#000000"><DIV class="headline"
>>onClick="sort('StateOrProvince')">State</DIV></td>
>>		<td bgcolor="#000000"><DIV class="headline"
>>onClick="sort('PostalCode')">Zip</DIV></td>
>>		<td bgcolor="#000000"><DIV class="headline"
>>onClick="sort('Country')">Country</DIV></td>
>>		<td bgcolor="#000000"><DIV class="headline"
>>onClick="sort('PhoneNumber')">Phone</DIV></td>
>>		<td bgcolor="#000000"><DIV class="headline"
>>onClick="sort('Extension')">Extension</DIV></td>
>>		<td bgcolor="#000000"><DIV class="headline"
>>onClick="sort('EmailAddress')">Email</DIV></td>
>>		<td bgcolor="#000000"><DIV class="headline"
>>onClick="sort('Card_Number')">Card Number</DIV></td>
>>		<td bgcolor="#000000"><DIV class="headline"
>>onClick="sort('Expiration_Date')">Expiration</DIV></td>
>>		<td bgcolor="#000000"><DIV class="headline"
>>onClick="sort('Username')">Username</DIV></td>
>>		<td bgcolor="#000000"><DIV class="headline"
>>onClick="sort('Password')">Password</DIV></td>
>>		<td bgcolor="#000000"><DIV class="headline"
>>onClick="sort('Membership_Date')">Membership Date</DIV></td>
>>		<td bgcolor="#000000"><DIV class="headline"
>>onClick="sort('Membership_Term')">Membership Term</DIV></td>
>>		<td bgcolor="#000000"><DIV class="headline"
>>onClick="sort('Renewal_Date')">Renewal Date</DIV></td>
>>		</THEAD>
>>
>>	    <xsl:for-each select="DATABASE/RECORD" order-by="CustomerID">
>><---this is the line I am attempting to transform
>>	  <tr>
>>        <td class="cell"><xsl:value-of select="CustomerID"/></td>
>>        <td class="cell"><xsl:value-of select="ContactFirstName"/></td>
>>        <td class="cell"><xsl:value-of select="ContactLastName"/></td>
>>		<td class="cell"><xsl:value-of
>>select="BillingAddress"/></td>
>>		<td class="cell"><xsl:value-of select="City"/></td>
>>		<td class="cell"><xsl:value-of
>>select="StateOrProvince"/></td>
>>		<td class="cell"><xsl:value-of select="PostalCode"/></td>
>>		<td class="cell"><xsl:value-of select="Country"/></td>
>>		<td class="cell"><xsl:value-of select="PhoneNumber"/></td>
>>		<td class="cell"><xsl:value-of select="Extension"/></td>
>>		<td class="cell"><xsl:value-of select="EmailAddress"/></td>
>>		<td class="cell"><xsl:value-of
>>select="Credit_Card_Number"/></td>
>>		<td class="cell"><xsl:value-of
>>select="Expiration_Date"/></td>
>>		<td class="cell"><xsl:value-of select="Username"/></td>
>>		<td class="cell"><xsl:value-of select="Password"/></td>
>>		<td class="cell"><xsl:value-of
>>select="Membership_Date"/></td>
>>		<td class="cell"><xsl:value-of
>>select="Membership_Term"/></td>
>>		<td class="cell"><xsl:value-of select="Renewal_Date"/></td>
>>
>>      </tr>
>>      </xsl:for-each>
>>	  </TABLE>
>>
>>	  </BODY>
>>	  </HTML>
>></xsl:template>
>></xsl:stylesheet>
>>
>> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>>
>>
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>


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


Current Thread