Thanks again, Stephen, I really appreciate your help. I'm still stuck.
That does not seem to fix the problem. I'm not sure I follow where exactly
I should be putting it, but I tried most every line within my "Page"
template, and got nothing different.
<xsl:param name="lett" select="$lett" /> had no effect on "page".
While each HTML page has a proper letter, it's not able to find the proper
title, e.g.
/g.thml
$lett: g
initTitle: A
The Title: Abie the Agent,
$lett_case_mod: G
I'm still not passing the lett (letter) variable in properly, and I'm
totally stumped as to how I do it.
-Blake
At 12:16 PM 5/14/2002 -0400, you wrote:
>Blake:
>
>XT supports template calling and param passing.
>
>Try eliminating the with-param from the call-template, and add <xsl:param
>name="lett" select="$lett" /> within the you page template, after your
>xsl:if, but before the xsl:for-each. This will set a param that will be
>picked up by your out template for each letter in //other. With-param can
>be used to override the param as picked up by your out template.
>
>You could also use xsl:key to do the same thing, where //other will match
>against your case-modified starts-with. But XT (the original version;
>there is newly updated one-- can't remember the URL) certainly does not
>support that.
>
>St.
>
>Stephen Yearl
>Systems Archivist
>Yale University Library::Manuscripts and Archives
>
>
>At 11:11 AM 5/14/2002 -0400, you wrote:
> >Hi All,
> >Stephen Yearl was a huge help with my problem yesterday, now on to a new
> >one I can't figure out.
> >
> >Does XT not accept sytax like this xsl:with-param name="target"
> >select="$target"
> >I am trying to pass a letter to another template.
> >In this case, OUT, selects the letters, and should be passing them to the
> >PAGE template, but XT is croaking on me when I try to pass it a letter
> >using the following syntax, and if I leave the with-param out the letters
> >don't make it. Can I do this a different way, or is the problem with
> >something else?
> >
> ><xsl:template name="out">
> > <html>
> > <head><title>Title</title></head>
> > <body>
> > <p>Line 1<br />Line 2</p>
> > <xsl:for-each select="/ead/archdesc/other/letter">
> > <xsl:variable name="file"><xsl:value-of select="."
> /></xsl:variable>
> > <xt:document method="html" href="{$file}.html">
> > <xsl:call-template name="page"/>
> > > </xsl:call-template>
> > </xt:document>
> > </xsl:for-each>
> > </body>
> > </html>
> ></xsl:template>
> >
> >
> ><xsl:template name="page">
<html>
<head><title>The Letter <xsl:value-of select="." /></title></head>
<body>
<xsl:for-each select=".">
<xsl:variable name="lett" select="."/>
$lett: <xsl:value-of select="$lett"/><br />
<xsl:variable name="initTitle"
select="substring(//did/unittitle/title,'1','1')" />
initTitle: <xsl:value-of
select="substring(//did/unittitle/title,'1','1')" /><br />
The Title: <xsl:value-of select="//did/unittitle/title" /><br />
<xsl:variable name="lett_case_mod"
select="translate($lett,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSSSTUVWXYZ')"
/>
$lett_case_mod: <xsl:value-of select="$lett_case_mod"/>
<xsl:if test="$lett_case_mod = $initTitle">
<xsl:call-template name="showbox"/>
</xsl:if>
<xsl:if test="substring(//did/unittitle/title,'1','1' =
'$lett_case_mod')"><f>hehe</f>
<xsl:call-template name="showbox"/>
</xsl:if>
</xsl:for-each>
</body>
</html>
</xsl:template>
|