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

Re: parameter oddness

Subject: Re: parameter oddness
From: Bruce D'Arcus <bdarcus@xxxxxxxxx>
Date: Mon, 6 Jun 2005 12:19:57 -0400
cs layout
On Jun 6, 2005, at 10:58 AM, Bruce D'Arcus wrote:

Nevermind. I've not quite figured out the problem, but I have figured out the parameter seems to not being passed in this circumstance.

Actually, I spoke too soon. The parameter is being passed, but it seems the text content of the element is not. Didn't even know that was possible!


The "when" branch of the choose within cs:first is working as expected, but the otherwise branch gives me the odd behavior (I can grab the attribute content from the templates the multi-author is passed to, but the element content is empty). Any suggestions?

<xsl:template match="cs:citation">
<xsl:param name="source" as="element()"/>
<xsl:param name="first-ref" as="xs:boolean"/>
<xsl:choose>
<xsl:when test="cs:first">
<xsl:choose>
<xsl:when test="$first-ref">
<xsl:apply-templates select="cs:first/cs:layout/cs:creator">
<xsl:with-param name="source" select="$source" as="element()"/>
<xsl:with-param name="multi-authors" select="cs:first/cs:multiple-authors" as="element(cs:multiple-authors)?"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="if (cs:subsequent/cs:layout) then (cs:subsequent/cs:layout/cs:creator)
else (cs:first/cs:layout/cs:creator)">
<xsl:with-param name="source" select="$source" as="element()"/>
<xsl:with-param name="multi-authors" select="if (cs:subsequent/cs:multiple-authors) then (cs:subsequent/cs:multiple-authors)
else (cs:first/cs:multiple-authors)" as="element(cs:multiple-authors)?"/>
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="cs:all/cs:layout/cs:creator">
<xsl:with-param name="source" select="$source" as="element()"/>
<xsl:with-param name="multi-authors" select="cs:all/cs:multiple-authors" as="element(cs:multiple-authors)?"/>
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</xsl:template>


In this case, the source that it is looking at is:

<citation delimiter=";">
<prefix>(</prefix>
<first>
<multiple-authors min-authors="6" use-first="6">et al.</multiple-authors>
<layout>
<creator>
<names-short/>
<suffix> </suffix>
</creator>
<year/>
<point>
<prefix>: </prefix>
</point>
</layout>
</first>
<subsequent>
<multiple-authors min-authors="6" use-first="1"/>
</subsequent>
<suffix>)</suffix>
</citation>


Bruce

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.