This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Remote source document


Hello,

I have a problem with a remote ducument. I use 'for-each' to itterate through som elements in a remote document using 'document()'. However beeing in the loop i seem to loose scope of the original document. How do i acces elements in the original source document within the loop?


	<xsl:template name="ProductPrice">
		<xsl:variable name="productID">
			<xsl:value-of select="@ID"/>
		</xsl:variable>
		<xsl:message>
			<xsl:value-of select="/ProductInformation/Products//Product[@ID = $productID]/Name"/>
				<!-- This message works fine. -->
		</xsl:message>
		<xsl:for-each select="document('Config.xml')/Config/Prices/PriceSet">
			<xsl:message>
				<xsl:value-of select="/ProductInformation/Products//Product[@ID = $productID]/Name"/> 
					<!-- This message does not work. The rootnode is the rootnode of the remote document -->
			</xsl:message>
		</xsl:for-each>
	</xsl:template>


Best regards,
Jesper S. Damgaard

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]