On Wed, 1 Aug 2001 15:47:22 +0200 "Jeroen Breedveld" <[EMAIL PROTECTED]> wrote:
> | -----Original Message----- > | From: [EMAIL PROTECTED] > | [mailto:[EMAIL PROTECTED] > | Behalf Of Lars Martin > | Sent: woensdag 1 augustus 2001 15:03 > | To: [EMAIL PROTECTED] > | Subject: Re: No xupdate:move element? > | > | > | > Do these new attributes have consequences for the append > | element? Its > | > child attribute could also be replaced with "before" and "after" > | > attributes or omitted altogether to append the new node > | after the last > | > child like it is now. > | > | IMO, to omit the "child" attribute isn't a good idea, > | because it provides > | the posibility to append childs in a specified (sorted) > | manner. What if > | a user would like to resort the child nodes of a context > | node? With the > | attribute "child='first()'" this would be a very easy task. > > I'm sorry that I haven't been clear. Users always have to be able to > append nodes in a certain context, the "child" attribute provides this > context but so could "before" and "after" that are already defined for > insert and move. The problem with "before" and "after" for append would > be that a XPath expression would be for the most part a repeation of > what's already in the "select" attribute. This is true. But "before" and "after" could contain an XPath relative to the "select"ed context node. Does this make sense? Assuming we have the following simple address database: <addresses> <address> <...> </address> <address> <...> </address> </addresses> I can apply the following XUpdate query to append a new address right after the first "address" child node_ <xupdate:append select="/addresses" after="address[1]"> <...> </xupdate> -- ______________________________________________________________________ Lars Martin mailto:[EMAIL PROTECTED] SMB GmbH http://www.smb-tec.com ---------------------------------------------------------------------- Post a message: mailto:[EMAIL PROTECTED] Unsubscribe: mailto:[EMAIL PROTECTED] Contact administrator: mailto:[EMAIL PROTECTED] Read archived messages: http://archive.xmldb.org/ ----------------------------------------------------------------------
