[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Trouble getting a node froma a document()

Subject: Trouble getting a node froma a document()
From: xptm <xptm@xxxxxxx>
Date: Thu, 29 Jul 2004 19:52:45 +0100
froma
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...

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.