Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: XSLT: need help with xsl:for-each >Thread Next - Re: XSLT: please help with XPath-expression XSLT: please help with XPath-expressionTo: NULL Date: 6/1/2005 1:55:00 PM Hello NG,
I have a XML file looking like this:
<symbol>
<objectgroup objid="abc">
<plugin pid="plugin1" href="..."/>
<plugin pid="plugin3" href="..."/>
</objectgroup>
<objectgroup objid="def">
<!-- ... -->
</objectgroup>
<!-- even more objectgroup elements -->
<plugins>
<plugin pid="plugin1"><desc>...</desc></plugin>
<plugin pid="plugin2"><desc>...</desc></plugin>
<plugin pid="plugin3"><desc>...</desc></plugin>
</plugins>
</symbol>
For each objectgroup/plugin element I'd like to access the
corresponding plugins/plugin element using the following
template:
<xsl:template match="objectgroup">
<!-- do something -->
<xsl:for-each select="./plugin">
<xsl:value-of select="/symbol/plugins/plugin[???]/desc"/>
^^^
</xsl:for-each> |
<!-- do something --> |
</xsl:template> |
|
+---------------------------------------------------+
v
How can I select /symbol/plugins/plugin haven the same pid
as the current pid in the xsl:for-each loop?
thanks in advance,
Gerald
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
