[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Kimber, Eliot wrote:
It must be my bug somewhere in my calling sequence or function declarations.
I set up the key-based approach suggested by David and Mike and verified that the keys will return the right value for my data using this sort of debugging report:
<xsl:message>
Long to short title map:
</xsl:message>
<xsl:for-each-group select="$resolvedDoc//section/title" group-by=".">
<xsl:variable name="baseTitle" select="string(current-group()[1])"/>
<xsl:message> - "<xsl:sequence select="$baseTitle"/>" - "<xsl:sequence select="(key('sectionLongToShortTitleMap', $baseTitle, $sectionTitleMap)[1]/shorttitle, $baseTitle)[1]"/>"</xsl:message>
</xsl:for-each-group>
But my actual functions still refuse to return the correct values, so it must be something stupid on my end.
Thanks for the help: I did learn something new, namely the (x,y)[1] idiom for getting a fallback value for a check that might fail.
Cheers,
Eliot
Re: [xsl] Looking Not Working for No Obvious Reason
Subject: Re: [xsl] Looking Not Working for No Obvious Reason From: "Eliot Kimber" <ekimber@xxxxxxxxxxxxxxxxxxx> Date: Wed, 20 Jun 2007 15:10:29 -0500 |
Kimber, Eliot wrote:
David Carlisle wrote: >> I must be doing something wrong but I can't figure out what it might >> be--the fact that some input values work and others don't is odd.
It must be my bug somewhere in my calling sequence or function declarations.
I set up the key-based approach suggested by David and Mike and verified that the keys will return the right value for my data using this sort of debugging report:
<xsl:message>
Long to short title map:
</xsl:message>
<xsl:for-each-group select="$resolvedDoc//section/title" group-by=".">
<xsl:variable name="baseTitle" select="string(current-group()[1])"/>
<xsl:message> - "<xsl:sequence select="$baseTitle"/>" - "<xsl:sequence select="(key('sectionLongToShortTitleMap', $baseTitle, $sectionTitleMap)[1]/shorttitle, $baseTitle)[1]"/>"</xsl:message>
</xsl:for-each-group>
But my actual functions still refuse to return the correct values, so it must be something stupid on my end.
Thanks for the help: I did learn something new, namely the (x,y)[1] idiom for getting a fallback value for a check that might fail.
Cheers,
Eliot
-- W. Eliot Kimber Professional Services Innodata Isogen 8500 N. Mopac, Suite 402 Austin, TX 78759 (214) 954-5198
ekimber@xxxxxxxxxxxxxxxxxxx www.innodata-isogen.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Looking Not Working for N, Eliot Kimber | Thread | Re: [xsl] Looking Not Working for N, David Carlisle |
Re: [xsl] Looking Not Working for N, Eliot Kimber | Date | Re: [xsl] Looking Not Working for N, David Carlisle |
Month |