p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

xslt thread: Tabular Representation using the XSL


Message #1 by "Vikram" <vikyjoshi@r...> on Tue, 3 Jul 2001 13:43:35
I don't think the "position()" function is supported in WD-xsl.

Please note, this is an XSLT list - see the subject line. Please assume that
answers given to questions are XSLT solutions, and don't assume that they
will work in WD-xsl, which is a quite different language.

Mike Kay
Software AG

> -----Original Message-----
> From: Vikram [mailto:vikyjoshi@r...]
> Sent: 04 July 2001 07:52
> To: P2P_XSLT
> Subject: [xslt] RE: Tabular Representation using the XSL
>
>
> i have incorporated your code in my code as
> <?xml version="1.0" ?>
>  <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
>  <xsl:template match="/">
>         <table bgcolor="eeeeee" align="center" width="60%">
> 		<xsl:for-each select="row[(position() mod 3) = 1]">
> 		  <row><tr>
> 		    <xsl:for-each select=".| following-sibling::row
> [position() <= 3]">
> 		      <cell><td>
> 		       <xsl:value-of select="."/>
> 		      </td></cell>
> 		    </xsl:for-each>
> 		  </tr></row>
> 		</xsl:for-each>
> 	</table>
>  </xsl:template>
>  </xsl:stylesheet>
>
> but when i use it my xml file which is as follows
> i get the follwoing error
>
> The XML page cannot be displayed
> Cannot view XML input using XSL style sheet. Please correct
> the error and
> then click the Refresh button, or try again later.
>
>
> --------------------------------------------------------------
> -------------
>
> Unknown method. row[(-->position()<-- mod 3) = 1]
>
> regards
> Vikram
> ---
> When you work at Microsoft, you don't have to wait for the
> latest technologies to be released. You'll create them ? with
> XML, SOAP, and C# -- and help decide what happens next.
> Find out where your career can take you: take a look at our
> software design engineer opportunities at
http://www.microsoft.com/jobs.


  Return to Index