xsl-list
[Top] [All Lists]

Re: [xsl] Looking Not Working for No Obvious Reason

2007-06-20 13:45:52
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(_at_)innodata-isogen(_dot_)com
www.innodata-isogen.com


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--