add current relation name: ../relation-name v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Wed, 30 Dec 2020 09:58:39 +0100
branchv_0
changeset 4 c58c7f2d4785
parent 3 709abeb5f6d1
child 5 682c378bc4a2
add current relation name: ../relation-name
bash-completion.sh
src/XPathHandler.h
--- a/bash-completion.sh	Wed Dec 30 01:37:41 2020 +0100
+++ b/bash-completion.sh	Wed Dec 30 09:58:39 2020 +0100
@@ -53,7 +53,7 @@
 	)
 
 
-	if   [[ "$w1" == "--relation"                      && "x$w0" == "x" ]];    then COMPREPLY=("''")
+	if   [[ "$w1" == "--relation"                      && "x$w0" == "x" ]];    then COMPREPLY=("'.*'")
 	elif [[ "$w1" == "--where"                         && "x$w0" == "x" ]];    then COMPREPLY=("''")
 	elif [[ "$w1" == "--xml-attribute"                 && "x$w0" == "x" ]];    then COMPREPLY=("''")
 	elif [[ "$w1" == "--output-attribute"              && "x$w0" == "x" ]];    then COMPREPLY=("''")
--- a/src/XPathHandler.h	Wed Dec 30 01:37:41 2020 +0100
+++ b/src/XPathHandler.h	Wed Dec 30 09:58:39 2020 +0100
@@ -128,8 +128,8 @@
 			for (auto oa : currentRelationConfiguration->outputAttributes) currentWriterMetadata.push_back({oa.name, oa.type});
 			if (isAppendingInputAttributes()) copyInputAttributesToOutput();
 
-			// TODO: prepare DOM
 			dom.get_document()->create_root_node("relpipe-tr-xpath");
+			dom.get_document()->get_root_node()->add_child("relation-name")->add_child_text(s2x(name));
 			resetRecordElement();
 		}