> -----Ursprungligt meddelande-----
> Fr�n: Gannholm Torbj�rn 
> Skickat:      den 3 augusti 2001 13:31
> Till: '[EMAIL PROTECTED]'
> �mne: Positioning results of insert, append and move
> 
> 
> Actually the xpath becomes more interesting in the case:
> /customers/addresses/address[1]
> because in this case there could be several addresses 
> elements, so the expression could actually refer to a node-set, while
> /customers/addresses/address[first()]
> would refer to just one node, the first element that fits the 
> description.

Sorry, above is wrong. XPath does not have a first() function. The
expression /customers/addresses/address[1] is always just the first child in
the whole document to match the expression.

What is the problem however is that if I do:
<xupdate:insert after='/customers/addresses/address[1]'>
on the "document":
<customers>
  <addresses>
    <address>...</address>
  </addresses>
...
  <addresses>
  </addresses>
...
  <addresses>
    <address>...</address>
  </addresses>
</customers>
then I must know in which <adresses> element the new content is placed
I guess in the first, in contrast to
<xupdate:insert before='/customers/addresses/address[2]'> which would place
it in the third <addresses> element.
But how do I get something into the second <addresses> element.

(The names and structure of these elements do not make sense, please view it
as an abstract example) 

The following question is still valid:

> 
> Side-track: How are node-contexts and node-sets 
> controlled/handled in xupdate?

> 
> Best regards
> Torbj�rn Gannholm
> 
> (The above letter does not in any way necessarily represent 
> the official opinion of my employer)
----------------------------------------------------------------------
Post a message:         mailto:[EMAIL PROTECTED]
Unsubscribe:            mailto:[EMAIL PROTECTED]
Contact administrator:  mailto:[EMAIL PROTECTED]
Read archived messages: http://archive.xmldb.org/
----------------------------------------------------------------------

Reply via email to