Subject: Re: [xsl] Multiple/conditional import problem From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 26 May 2011 15:19:08 +0100 |
Thanks Dave!you don't want this as that would apply any imported templates that match <property>
The properties will be usually grouped into some classes - and then one stylesheet per class.
I think for now I'll just import those specific stylesheets I've developed myself into default.xsl, ant figure out the pre-processing step later.
Usually specific stylesheet (image.xsl) imports general one (default.xsl), however in this case it would be the way around - but it makes sense here?
Can you take a look at the pseudo-code below just to make sure I got it right:
default.xsl:
<xsl:imports href="image.xsl"/>
<xsl:template match="property"> <dt> <xsl:value-of select="@name"/> </dt> <dd> <xsl:apply-templates select="value"/> <xsl:apply-imports/>
</dd> <xsl:template>
<xsl:template match="property/value"> <xsl:value-of select="."/> </xsltemplate>
image.xsl:
<xsl:template match="property[@name = 'image']/value"> <img src="{.}"/> <xsl:template>
Do I need<xsl:apply-templates select="value"/> in default.xsl or will it be called automatically if<xsl:apply-imports/> fails to find match in image.xsl?
________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Multiple/conditional impo, Martynas Jusevicius | Thread | Re: [xsl] Multiple/conditional impo, Martynas Jusevicius |
Re: [xsl] Multiple/conditional impo, Martynas Jusevicius | Date | Re: [xsl] Multiple/conditional impo, Martynas Jusevicius |
Month |