xsl-list
[Top] [All Lists]

RE: Value-of varible question

2004-04-17 01:32:37
 
It seams that its is using the value of one for both. I just 
want to return
the one that lang matches. Any idea on what im doing wrong?

<xsl:template match="Title">
            <Title>
                    <xsl:copy-of
select="/iThink.ePulp/Page/Content/Meta/Title[(_at_)lang=$local]"/>
            </Title>
    </xsl:template>

I don't think you have really understood template rules and path
expressions. Every time this encounters a Title element, it is selecting all
the Title elements with the appropriate language and copying them. So if you
have 5 relevant titles in your document, you are going to output 25 titles.

It might be a good idea to put down your coding pencil for a few hours and
do some reading.

Michael Kay