Subject: Re: [xsl] variable question From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx> Date: Tue, 31 Aug 2004 05:55:06 -0400 |
If the relevant function call is the one shown, it means that the parent of
the mods:titleInfo context item is not a mods:relatedItem element, therefore
the function has been called with an empty sequence as the argument, which
is not allowed given the way you have declared the parameter.
<relatedItem type="host"> <titleInfo> <title>Newsweek</title> </titleInfo>
<xsl:function name="mods:reftype" as="xs:string"> <xsl:param name="relatedItem" as="element(mods:relatedItem)" /> <xsl:choose> <xsl:when test="$relatedItem/@type = 'host'"> <xsl:variable name="issuance" as="xs:string" select="$relatedItem/mods:originInfo/mods:issuance" /> <xsl:choose> <xsl:when test="$issuance = 'continuing'">article</xsl:when> <xsl:when test="$issuance = 'monographic'">chapter</xsl:when> </xsl:choose> </xsl:when> <xsl:otherwise>book</xsl:otherwise> </xsl:choose> </xsl:function>
<xsl:template match="mods:titleInfo" mode="title-before"> <xsl:if test="mods:reftype(parent::mods:relatedItem) = 'chapter'"> <xsl:text>"</xsl:text> </xsl:if> </xsl:template>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] variable question, Michael Kay | Thread | Re: [xsl] variable question, David Carlisle |
Re: [xsl] collapsing number ranges, Bruce D'Arcus | Date | Re: [xsl] variable question, David Carlisle |
Month |