Thanks guys, it works...
I really was in error on the current() issue, it's good to learn...
I don't know, however, why my var aproach didn't work, probably i was declaring
it wrong, because now it's working too...
Many thanks.
Citando Phil Endecott <spam_from_xslt_list(_at_)chezphil(_dot_)org>:
select="document(concat('Z:\DicionarioXml\',$MasterTable,'.xml'))
> /Estrutura/Tabelas/Tabela[Nome=$MasterTable]/Indices/Indice/Campos/
> Campo[Nome=(_at_)Nome]/Visivel"
Here, @Nome is looking for a Nome attribute of the Campo element. For
example, it would match this:
<Campo Nome="xxx">
<Nome>xxx</Nome>
</Campo>
You want to use the Nome attribute of the *current* element. To do
this, use the current() function, like this:
......Campo[Nome=current()/@Nome].....
So it seems the problem is with @Nome? I also tryed to put that in a
variable and use it, but the effect is the same.
It should also work with a variable. Sometimes I use variables to make
this sort of expression easier to understand. For example you could write:
<xsl:variable name="wanted-nome" select="@Nome"/>
..
..select="......Campo[Nome=$wanted-nome].....
--Phil.
--+------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--
O SAPO já está livre de vírus com a Panda Software, fique você também!
Clique em: http://antivirus.sapo.pt