Subject: Re: [xsl] Building complex, hierarchical html datasets From: Mark <charltonrainbird@xxxxxxxxxxxxxx> Date: Tue, 19 May 2009 13:54:49 +0100 |
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,an cestor::group,parent::*)[1]/ > (heading[@type ='electronic-only'],heading[@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> > B <xsl:with-param name="heading" B tunnel="yes" select="(heading[@type > ='electronic-only'],heading[@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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Building complex, hierarc, David Carlisle | Thread | Re: [xsl] Building complex, hierarc, Wendell Piez |
Re: [xsl] question on xml-styleshee, Michael Dykman | Date | RE: [xsl] question on xml-styleshee, Scott Trenda |
Month |