From: Kyle Partridge [mailto:kpartridge(_at_)mathsoft(_dot_)com]
I've got an xpath that narrows a set of all the regions in the document,
to the set of regions in a single "column":
<xsl:variable name="col-regions" select="//ws:region[parent::ws:regions
and @left>0 and (@left+(_at_)width)<$useable-page-width]"/>
Then, I'm trying to iterate over that set:
but this doesn't work - the XMLSpy debugger says I am not getting
anything in these params.
I'm unsure what kind of solution is appropriate, mainly because we don't get
to see what actually happens inside the 'horizontal-region-block' mode
However, there seems to be something rather awkward about the structure
<xsl:apply-templates select="." mode="different-mode">
<xsl:with-param name="pprec" select="preceding-sibling::*" />
<xsl:with-param name="pfoll" select="following-sibling::*" />
which seems more or less what you're trying to do.
The reason for my thinking so is the fact that the preceding- and
following-sibling axes will *per se* be available from within the matching
template, since the context node will be changed by the
apply-templates --I'm absolutely dazzled as to why you would want to pass
these in as parameters...
The above just needs to become:
<xsl:with-param name="pparam" select="expr" />
where the param is used to collect data which is easily accessible from the
context surrounding the apply-templates, but won't be too easily reachable
from within the context of the matching template.
Hope this gives you an idea (or two)!