[Home] [By Thread] [By Date] [Recent Entries]
At 2009-07-17 05:55 +0200, Hermann Stamm-Wilbrandt wrote:
Now I have three questions: 1) How can I inspect the output of the transformation in the browser? "View source" does not help since it shows the XML input. If you are using IE then you can run the IE DLL from the command line using a tool I posted January 2001 based on discussions on this list: http://www.CraneSoftwrights.com/resources/debugmsxml ... just scrape the 14-line script and five-line batch file. 2) How can I make the output of the browser transformation similar to that of xsltproc? That sounds like an <xsl:output indent="no"/> would address the problem, but you don't give many (any!) clues as to what is actually wrong, so I'm not sure how you can ask us to tell you how to fix it. <html><table border="1"><tr><td><img src="gif/brw.gif"><img src="gif/ bnb.gif"><img src="gif/bbw.gif"><img src="gif/bqb.gif"><img src="gif/ bkw.gif"><img src="gif/bbb.gif"><img src="gif/bnw.gif"><img src="gif/ brb.gif"><br><img src="gif/bpb.gif">... ...<img src="gif/wrw.gif"><br></td></tr></table></html> I am guessing you are not aware of a basic facility in XSLT that <xsl:apply-templates/> is allowed to pass parameters. This is your code:
Without testing, I think your code above reduces to: <xsl:template match="row">
<xsl:apply-templates select="f">
<xsl:with-param name="rowOffset" select="position() mod 2"/>
</xsl:apply-templates/>
</xsl:template>
<xsl:template match="f" name="img">
<xsl:param name="rowOffset"/>
<xsl:variable name="pos" select="position() + $rowOffset"/>
... img template stuff ...
</xsl:template>I hope this helps. . . . . . . . . . . . Ken -- XSLT/XSL-FO/XQuery hands-on training - Oakland, CA, USA 2009-08-03 Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
|

Cart



