RE: RE: [xsl] xpath predicate help

Subject: RE: RE: [xsl] xpath predicate help
From: cknell@xxxxxxxxxx
Date: Thu, 17 Feb 2005 17:29:34 -0500
I jumped too quickly, like Michael Kay said. Sorry for the misinformation, but the AVT will come in handy at some point, so do look into it.
-- 
Charles Knell
cknell@xxxxxxxxxx - email



-----Original Message-----
From:     McKinstry, Scott A <scott.a.mckinstry@xxxxxxxx>
Sent:     Thu, 17 Feb 2005 15:07:48 -0500
To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  RE: [xsl] xpath predicate help

when I do that, I get an invalid character. {

The part that contains the <xsl:value-of select="$link-target"/>
is working fine I believe

It is the other part.
<xsl:value-of select="$parent_graphic/@id"> 
that is not working.  I will still look into AVT.



<xsl:when test="name(//*[@id=$link-target])='grphprim'">
	<xsl:variable name="parent_graphic"
select="//graphic[grphprim/@id=$link-target]"/>
	<xsl:value-of select="$parent_graphic/@id">
</xsl:when>


-----Original Message-----
From: cknell@xxxxxxxxxx [mailto:cknell@xxxxxxxxxx]
Sent: Thursday, February 17, 2005 2:42 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] xpath predicate help


It doesn't work because you are not yet familiar with the attribute
value template (avt). Add curly braces like this:

<xsl:value-of select="{$link-target}"/>

That's how you get the evluation of a variable in an attribute value.
-- 
Charles Knell
cknell@xxxxxxxxxx - email



-----Original Message-----
From:     McKinstry, Scott A <scott.a.mckinstry@xxxxxxxx>
Sent:     Thu, 17 Feb 2005 13:47:45 -0500
To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  [xsl] xpath predicate help

I am transforming SGML to XML.
The sample sgml is:

<graphic id="123" name="graphic" ......>
	<grphprim id="456" ....>
</graphic>

Current Thread