Project

Profile

Help

key usage gives error with wrong line number

Added by Anonymous almost 19 years ago

Legacy ID: #3227353 Legacy Poster: DD (ddevienne)

A 2.0 stylesheet processed with saxon 8.4 declares a top level key: <xs:key name="users" match="users/user" use="string(@id)" /> Only use is from line 57: <xsl:template match="user[@refid]" mode="passwd" priority="20"> <xsl:apply-templates select="key('users', @refid)" /> </xsl:template> Which is called from a named template so: <xsl:apply-templates mode="passwd" select="users//user"> itself called so on line 36/37/38: <xsl:result-document href="{$cvsroot}/passwd"> <xsl:call-template name="passwd" /> </xsl:result-document> Saxon fails with this error: cvsroot.xsl:36: Fatal Error! Key users has not been defined I'm confused as to why the error points to this line, and don't understand how the top-level defined key can't be defined somehow. I guess I'll try without using key until somebody can point out what I'm doing wrong. Thanks, --DD


Replies (1)

RE: key usage gives error with wrong line number - Added by Anonymous almost 19 years ago

Legacy ID: #3227365 Legacy Poster: DD (ddevienne)

Hmmm, never mind... And sorry for the noise. If I use xsl:key instead of xs:key, all is fine (of course). The line number was still a surprise though, and may be a little bug? Thanks, -DD

    (1-1/1)

    Please register to reply