From: Adam R. <ada...@de...> - 2007-11-27 22:59:26
|
just a guess but try - <xupdate:append xmlns:xupdate=3D"http://www.xmldb.org/xupdate" xmlns:ns=3D"http://www.mynamespace" select=3D"/ns:A/ns:B"> <xupdate:element name=3D"ns:C">c</xupdate:element> </xupdate:append> -----Original Message----- From: exi...@li... on behalf of mzha Sent: Tue 27/11/2007 16:23 To: exi...@li... Subject: [Exist-open] howto insert an element with namespace =20 Hello there, I tried to insert an element in a document=20 document: XUpdate: <xupdate:append xmlns:xupdate=3D"http://www.xmldb.org/xupdate" xmlns:ns=3D"http://www.mynamespace" select=3D"/ns:A/ns:B">=20 <xupdate:element name=3D''C" namespace=3D"http://www.mynamespace">c</xupdate:element> </xupdate:append> The element "C" would be inserted correctly als child of B. But I can = not query it ! XQuey: declare namespace ns=3D'http://www.mynamespace'; for $q in collection('myCollection')/ns:A/ns:B/ns:C return $q I got no result with this query. But when I query the element "C" = without prefix "ns:" -=20 "for $q in collection('myCollection')/ns:A/ns:B/C", i got <C>c</C> as returnd value. Is there something wrong with my xupdate statement?=20 Can somebody tell me, what is the correct syntax to insert an element = with namespace? Thank you in advance, ming =20 --=20 View this message in context: = http://www.nabble.com/howto-insert-an-element-with-namespace-tf4882740.ht= ml#a13973898 Sent from the exist-open mailing list archive at Nabble.com. -------------------------------------------------------------------------= This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Exist-open mailing list Exi...@li... https://lists.sourceforge.net/lists/listinfo/exist-open |