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

Re: key and document()

Subject: Re: key and document()
From: Denys Duchier <Denys.Duchier@xxxxxxxxxxxx>
Date: 23 Aug 1999 18:32:15 +0200
alex shevchuk
Kay Michael <Michael.Kay@xxxxxxx> writes:

> > 1. the description of xsl:key fails to specify where the nodes that
> >    are being matched come from.  I assume that they are all the nodes
> >    in the `primary' source document (does this also include attribute,
> >    namespace, text and processing instruction nodes?)
> 
> No, they are the nodes of the document that contains the current node when
> the key() function is invoked. But yes, they can be nodes of any type.

If I understand you correctly, then each document, whether it is the
`primary' one being transformed or a `secondary' one referred to by
means of the document() function, has its own collection of keys.

Thus assuming the following variable declaration:

        <variable name="db" select="document('db.xml')"/>

In order to get keys from secondary document $db, I must use an
expression of the form:

        $db/key($name,$value)

is that the intention?

Does it not follow from this that I can never have a key that contains
nodes from multiple documents?

If a multi-document spanning key is desired, then it must be simulated
by means of union expressions (thus forcing database merging to be
expressed at each point of use rather than at the point of
`definition').

Sincerely,

-- 
Dr. Denys Duchier			Denys.Duchier@xxxxxxxxxxxx
Forschungsbereich Programmiersysteme	(Programming Systems Lab)
Universitaet des Saarlandes, Geb. 45	http://www.ps.uni-sb.de/~duchier
Postfach 15 11 50			Phone: +49 681 302 5618
66041 Saarbruecken, Germany		Fax:   +49 681 302 5615


 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.