Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: xpath problems?

From: "Jeremy Chapman" <please@------------->
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?
>
> 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent