|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Trouble getting a node froma a document()
Hi again:
I have this XML in a file <Estrutura>
<Tabelas>
<Tabela>
<Nome>ProcessoTipo</Nome>
<Indices Numero="1">
<Indice>
<Campos Numero="1">
<Campo>
<Nome>ProcessoTipo_K</Nome>
<Visivel>0</Visivel>
</Campo>
</Campos>
</Indice>
</Indices>
</Tabela>
<Tabela>
<Nome>ProcessoTipoGrupo</Nome>
<Indices Numero="1">
<Indice>
<Campos Numero="1">
<Campo>
<Nome>ProcessoTipoGrupo</Nome>
<Visivel>1</Visivel>
</Campo>
</Campos>
</Indice>
</Indices>
</Tabela>
</Tabelas>
</Estrutura>wich i'm acessing via document() function. What i want is to get the Visivel tag value. So i'm doing <xsl:value-of select="document(concat('Z:\DicionarioXml\',$MasterTable,'.xml'))/Estrutura/Tabelas/Tabela[Nome=$MasterTable]/Indices/Indice/Campos/Campo[Nome=@Nome]/Visivel"/> from a node in the original xml file where i have a Nome attribute <Campo Nome="ProcessoTipoGrupo"> and where $MasterTable = "ProcessoTipoGrupo". So i expected the value 1, but i don't get any value. If i omit the [Nome=@Nome] i get the value '1'. But i can have several <Campo> nodes... If i only omit the /Visible i get nothing. If i omit [Nome=@Nome]/Visivel i get 'ProcessoTipoGrupo01', wich is what i expected. 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. Help, anyone? I can send the full example, but it's quite large...
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








