xsl-list
[Top] [All Lists]

Re: [xsl] Building complex, hierarchical html datasets

2009-05-19 08:55:37
David

Thanks very much for these responses.

I wasn't aware of this syntax option:

<xsl:value-of select="
(ancestor::exp-level-1,ancestor::misc-level-1,ancestor::reg,,ancestor::law,ancestor::group,parent::*)[1]/
(heading[(_at_)type ='electronic-only'],heading[(_at_)type 
='running-head'],heading)[1]"/>

and your thoughts on using tunnel parameters in this situation could
help me avoid more code bloat

<xsl:apply-templates>
 <xsl:with-param name="heading"  tunnel="yes" select="(heading[(_at_)type
='electronic-only'],heading[(_at_)type ='running-head'],heading)[1]"/>
</xsl:apply=templates/>

Then the template that needs the heading needn't mess about with the
ancestor axis at all, just have

<xsl:template match="abc">
<xsl:param name="heading" tunnel="yes"/>
..
<xsl:value-of select="$heading"/>

Just these ideas to help slim down my stylesheet drastically will be
really useful as it makes the whole transformation easier to visualise
and work on. I could have introduced more modularisation to keep the
code chunks manageable but that can introduce other complexities I'd
rather avoid unless I really need to use them.

Cheers

Mark

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>