Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: xpath problems? >Thread Next - Re: xpath problems? Re: xpath problems?To: NULL Date: 6/2/2006 2:44:00 PM
$doc is a variable when references an external document (<xsl:variable
name="doc" select="document('external.xml') />
Are you saying the <xsl:value-of
select="/*[local-name()='config']/*[local-name()='xsddocs']/@href"/>
statement is working on the $doc nodeset because of the <for-each that its
in? If so, how would I work on the non external document?
"Anthony Jones" <Ant@y...> wrote in message
news:uB2vLtohGHA.4252@T......
>
> "Jeremy Chapman" <please@Idontlikespam> wrote in message
> news:u3cEN%23lhGHA.1000@T......
>> Code snippet below (shortened for illustration purposes)
>> My problem is that if I move the <xsl:value-of statement to the first
>> line
>> under <xsl:template match="/"> then it returns the @href attribute as I
>> would expect. But if I leave it as shown below, it doesn't return a
> value,
>> but I don't understand why. Can someone shed some light?
>>
>> <xsl:template match="/">
>> <xsl:call-template name="processSegmentDetails" >
>> </xsl:template>
>>
>> <xsl:template name="processSegmentDetails">
>> <xsl:for-each
>>
> select="$doc/*[local-name()='schema']/*[local-name()='element'][@name=$strRo
> otReference]/*[local-name()='complexType']/*[local-name()='sequence']/*[loca
> l-name()='element']">
>> <xsl:value-of
>> select="/*[local-name()='config']/*[local-name()='xsddocs']/@href"/>
>> </xsl:template>
>>
>>
>
> Where does $doc get it's nodes from?
>
>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
