--- a/xquery/trunk/XQuery__ReplaceCommand.st Fri Apr 20 16:58:54 2012 +0000
+++ b/xquery/trunk/XQuery__ReplaceCommand.st Tue May 01 15:43:35 2012 +0000
@@ -53,24 +53,28 @@
"Created: / 14-11-2007 / 10:06:41 / janfrog"
"Modified: / 14-11-2007 / 16:09:43 / janfrog"
+ "Modified: / 12-03-2012 / 15:07:29 / Adam Senk <senkadam@gmail.com>"
! !
!ReplaceCommand methodsFor:'replacing'!
replaceNode:targetNode with:sourceNodes
- |importedSourceNodeIds|
+ |importedSourceNodes|
- importedSourceNodeIds := sourceNodes
- collect:[:sourceNode |
- targetNode documentAdaptor importForeignNode:sourceNode
+ importedSourceNodes := sourceNodes
+ collect:[:sourceNode | sourceNode itemKind isConstructedNode ifTrue:[
+ targetNode documentAdaptor importForeignNode:sourceNode
adaptor:sourceNode documentAdaptor
+ ]
+ ifFalse:[sourceNode.].
+
].
- targetNode documentAdaptor updReplaceNode:targetNode nodeId
- with:importedSourceNodeIds
+ targetNode documentAdaptor updReplaceNode:targetNode
+ with:importedSourceNodes
"Created: / 14-11-2007 / 10:24:04 / janfrog"
"Modified: / 05-12-2007 / 14:26:29 / janfrog"
- "Modified: / 07-02-2012 / 19:15:53 / Adam Senk <senkadam@gmail.com>"
+ "Modified: / 01-05-2012 / 16:56:25 / Adam Senk <senkadam@gmail.com>"
! !
!ReplaceCommand class methodsFor:'documentation'!