Subject: Re: [xsl] get back from nodeset to root ? From: Joerg Heinicke <joerg.heinicke@xxxxxx> Date: Tue, 17 Dec 2002 11:05:52 +0100 |
Hello Joerg,
thanks, that helped pretty very much some things seems so strange but are really easy.
regards
Heiko
Monday, December 16, 2002, 6:46:26 PM, you wrote:
JH> Hello Heiko,
JH> Heiko Specht wrote:
Hello all Mail list users,
I have a small (no its large) problem from getting results from a nodeset and use them in them in the xml of the document root (or what it is called).
I have created an variable which i called "astring" giving me (i do there a lot of string commands) what i wanted !!
<!-- this works perfect for me --> <xsl:variable name="alllanguage" select="xalan:nodeset($astring)/all/artname"/> <select name="A"> <xsl:for-each select="$alllanguage"> <xsl:if test="generate-id(.) = generate-id($alllanguage[.=current()])"> <option><xsl:value-of select="normalize-space()" /></option> </xsl:if> </xsl:for-each> </select><br/><br/> <!-- end of great work -->
What i want is to check if in my xml in the path /page/article-list/article
<xsl:for-each select="$alllanguage"> <xsl:if test="generate-id(.) = generate-id($alllanguage[.=current()])"> <!-- works --> <xsl:value-of select="normalize-space()" /> <xsl:variable name="thisname" select="normalize-space()" /> <!-- end of works -->
<!-- i want back into my xml document but no chance --> <xsl:variable name="articelIds" select="/page/article-list/article"/>
JH> you can simply move the variable declaration of articleIds outside of JH> this for-each.
<xsl:for-each select="$articelIds">
<!-- there is an element in this path called articleName -->
<xsl:if test="contains(articleName, $thisname)">
<xsl:value-of select="article_id"/><br/>
</xsl:if>
</xsl:for-each>
JH> This can be simplified to
JH> <xsl:for-each select="$articleIds[contains(acrticleName, $thisname)]"> JH> <xsl:value-of select="article_id"/><br/> JH> </xsl:for-each>
JH> Regards,
JH> Joerg
</xsl:if> </xsl:for-each>
I have search for so long, but couldn'd find the answer. a little help would be great. TIA
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re[2]: [xsl] get back from nodeset , Heiko Specht | Thread | Re[2]: [xsl] get back from nodeset , Heiko Specht |
[xsl] Extending Xhtml2fo.xsl to han, Graham Hannington | Date | Re: [xsl] VML XSL examples - was SV, Stillian Triffonov |
Month |