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

Re: how to read a pseudo-duplicated key?

Subject: Re: how to read a pseudo-duplicated key?
From: "Marco Pedrini" <marco.pedrini@xxxxxxxxxx>
Date: Fri, 30 May 2003 14:59:52 +0200
marco pedrini
ok, Lars 

it works with a definition like : select="/*/PORTPATH"...

A question, to understand what I've done: could you explain me the differences between this statement and one like this  select="//PORTPATH" ?
with the first I'm looking for 'PORTPATH' at a defined level? or not ...
perhaps stupid question of a stupid schoolboy, but this is ...

next time spaghetti & pizza for all you
thanx a lot
Marco



-----Messaggio Originale----- 
Da: "Lars Huttar" <lars_huttar@xxxxxxx>
A: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Data invio: giovedì 29 maggio 2003 18.05
Oggetto: RE:  how to read a pseudo-duplicated key?


> 
> 
> Marco Pedrini wrote:
> > Hi all,
> >     while I'm reading my XML file, how could I choose the
> > right value for tha key "PORTPATH" if it is defined in two
> > places, at a first level, and inner the "REGISTER_STOR" tag,
> > at a second level ?
> 
> The first question is, what are your criteria for deciding which
> is the right value?
> 
> > Now the value retrieved is not the one at a first level
> > (value :8071)!
> 
> Right now the value of the PortPath variable is a nodeset including
> all nodes that match //PORTPATH.  The first of these, in document
> order, is /REGISTER_STOR/PORTPATH.  Depending on how you use $PortPath
> in an expression, you will probably get only this first one.
> 
> > How can I get this gool?
> 
> If what you want is the PORTPATH at the top level, then use
> 
>   <xsl:variable name="PortPath" select="/PORTPATH"/>
> 
> However that's going by your XML snippet, which is not a well-formed
> XML document (it has more than one top-level element).
> So it's possible that what you really want is select="/*/PORTPATH"...
> it depends on what your input XML document really looks like,
> and what your design specification is for which PORTPATH is
> the one that matters.
> 
> Lars
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.