[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Building complex, hierarchical html datasets

Subject: Re: Building complex, hierarchical html datasets
From: Mark <charltonrainbird@xxxxxxxxxxxxxx>
Date: Tue, 19 May 2009 13:54:49 +0100
Re:  Building complex
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.