Subject: Re: [xsl] union vs. "or" vs. contains? From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Tue, 19 Oct 2004 18:09:15 -0400 |
On Oct 19, 2004, at 7:03 AM, David Carlisle wrote:
The following does the same, but I think it's clearer, and it's probably more efficient as the test only has to be done once, not on every element that might possibly match.
<xsl:apply-templates select="*[$foo='x']"/> or perhaps clearer <xsl:if test="$foo='x'"> <xsl:apply-templates/> </xsl:if>
I'm not understanding how to implement this. How do I distinguish among the five different mods:modsCollection templates I'm applying if I'm not putting a conditional statement on the match statement of those templates?
Cheers, Wendell
This is what I started to do, but it's not making much sense to me.
<xsl:template match="db:bibliography">
<xsl:choose>
<xsl:when test="not($citation-class='note-nobib')">
<div id="bibliography">
<h2>References</h2>
<xsl:choose>
<xsl:when test="$citation-class='author-year'">
<xsl:apply-templates select="mods:modsCollection[$citation-class='author-year']" mode="bibliography"/>
</xsl:when>
<xsl:when test="$citation-class='citekey'">
<xsl:apply-templates select="mods:modsCollection[$citation-class='citekey']" mode="bibliography"/>
</xsl:when>
....
</xsl:choose>
</div>
</xsl:when>
</xsl:choose>
</xsl:template>
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] union vs. "or" vs. contai, Bruce D'Arcus | Thread | Re: [xsl] union vs. "or" vs. contai, Bruce D'Arcus |
Re: [xsl] processing nodes with CDA, Oswald Campesato | Date | Re: [xsl] match string, Zsolt Szabó |
Month |