Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


nested xsl:for-each with document function

From: Cozmo <C_o_z_m_o@---.-->
To: NULL
Date: 9/10/2009 4:40:00 AM
Hello,

I want to do a nested xsl:for-each with the document function.

Here is a code snippet but it is not working:

<xsl:variable name="cc" select="lower-case(../code-2)"/>
        <xsl:variable name="names_DA" select="document('export.xml')/
translation/record[iso.code2=$cc]"/>
	<xsl:variable name="lgs" select="lg.vers"/>
	<xsl:for-each select="$names_DA">
		<xsl:for-each select="$lgs">
			<xsl:choose>
				<xsl:when test="@lg=$names_DA/source.lang"/>
				<xsl:otherwise>
					<xsl:element name="lg.vers">
						<xsl:attribute name="lg"><xsl:value-of select="$names_DA/
source.lang"/></xsl:attribute>
						<xsl:value-of select="$names_DA/short.name"/>
					</xsl:element>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:for-each>
	</xsl:for-each>

The problem I have is that I have to run through all entries of the
external document (with restriction) and afterwards check the other
restrictions in the second for-each. I want to check if the entries
already exists and if not I have to add them out of the external
docoument.

if I use this one:
<xsl:value-of select="$names_DA/short.name"/>
I get entries but it returns the complete records and not only the
current one of the for-each loop.

Hope this explains the problem. Would be happy for any help!

Thanks a lot.
Cozmo



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