summaryrefslogtreecommitdiff
path: root/storage/connect/tabxml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'storage/connect/tabxml.cpp')
-rw-r--r--storage/connect/tabxml.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp
index c56f2bea110..ceba0a25ef7 100644
--- a/storage/connect/tabxml.cpp
+++ b/storage/connect/tabxml.cpp
@@ -1519,9 +1519,13 @@ bool XMLCOL::ParseXpath(PGLOBAL g, bool mode)
if (!mode)
// Take care of an eventual extra column node a la html
if (Tdbp->Colname) {
- sprintf(pbuf, Tdbp->Colname, Rank + ((Tdbp->Usedom) ? 0 : 1));
- strcat(pbuf, "/");
- } // endif Colname
+ char *p = strstr(Tdbp->Colname, "%d");
+ if (p)
+ snprintf(pbuf, len + 3, "%.*s%d%s/", (int) (p - Tdbp->Colname), Tdbp->Colname,
+ Rank + (Tdbp->Usedom ? 0 : 1), p + 2);
+ else
+ snprintf(pbuf, len + 3, "%s/", Tdbp->Colname);
+ } // endif Colname
if (Xname) {
if (Type == 2) {
@@ -1811,6 +1815,9 @@ void XMLCOL::WriteColumn(PGLOBAL g)
else if (Tdbp->Clist)
ColNode = NULL;
+ // refresh CList in case its Listp was freed in SelectSingleNode above
+ if (Tdbp->Clist)
+ Tdbp->RowNode->SelectNodes(g, Tdbp->Colname, Tdbp->Clist);
} // endfor i
/*********************************************************************/