Page 4 of 8
Re: revxml
Posted: Wed Sep 11, 2013 2:30 pm
by LCMark
The revxml xpath additions @mwieder has contributed will appear in 6.5-dp-1 which we're hoping to get out asap

Re: revxml
Posted: Wed Sep 11, 2013 5:15 pm
by mwieder
That isn't a typo? We're going from 6.1 straight to 6.5? I'll have to change the doc files in that case.
You cannot make another post so soon after your last.
Re: revxml
Posted: Wed Sep 11, 2013 5:31 pm
by LCMark
@mwieder: Already done
You cannot make another post so soon after your last.
Re: revxml
Posted: Wed Sep 11, 2013 5:43 pm
by mwieder
Thanks. Yes, I'm pawing through the changes now, and I see those done.
Re: revxml
Posted: Thu Feb 06, 2014 7:24 pm
by malte
Folks,
I could swear there was one command that was called
revPutIntoXMLNode
obviously now it is called
revXMLPutIntoNode
When did that change? The old call appears to crash the engine now (at least on the Mac) Any hints there?
Re: revxml
Posted: Thu Feb 06, 2014 10:02 pm
by bn
Hi Malte,
apparently it was changed in 6.5 and they omitted the old forms/ or they are broken.
from the release notes 6.5
The following xpath functions were added to the engine:
'revXMLEvaluateXPath' 'revXMLDataFromXPathQuery'
In addition, several synonyms for existing commands are now available for consistency:
'revXMLCreateTree' 'revXMLCreateTreeWithNamespaces' 'revXMLCreateTreeFromFile' 'revXMLCreateTreeFromFileWithNamespaces' 'revXMLDeleteTree'
'revXMLAppend' 'revXMLDeleteAllTrees' 'revXMLAddNode' 'revXMLDeleteNode' 'revXMLInsertNode' 'revXMLMoveNode' 'revXMLCopyNode' 'revXMLCopyRemoteNode' 'revXMLMoveRemoteNode' 'revXMLPutIntoNode' 'revXMLSetAttribute'
Kind regards
Bernd
Re: revxml
Posted: Thu Feb 06, 2014 10:17 pm
by malte
Ok, so the old ones are supposed to be synonyms then. I will set up a test case and file a bug then.
Thanks Bernd.
Re: revxml
Posted: Fri Feb 07, 2014 3:43 am
by mwieder
Malte- yes, I changed the names to make the xml commands more consistent (now they *all* start with "revXML"), but I left the old commands in place as synonyms and marked them as deprecated. They *should* still work, and it's a bug if they don't. This shouldn't have broken backward compatibility.
Re: revxml
Posted: Fri Feb 07, 2014 7:05 am
by malte
Thanks Mark! That was what I was hoping. It is a bug then, I will set up a demo stack.
All the best!
Malte
Re: revxml
Posted: Fri Feb 07, 2014 7:55 am
by malte
Oh the joys of debugging. Of course the atomic recipe stack does not crash.

Re: revxml
Posted: Fri Feb 07, 2014 11:19 am
by malte
Re: revxml
Posted: Fri Feb 07, 2014 5:22 pm
by mwieder
Malte- thanks for the test stack in the bug report. I can confirm that it does indeed crash the engine. But it's not a matter of the naming convention - it crashes no matter whether I use the new or old synonym.
The difference is that the crash button sets the replaceTextOnly argument to true but has an empty replacement string. If you change the empty string to something else then it doesn't crash and gives proper results. Are you trying to delete a node? There's a different revxml command for that.
That's not an excuse for crashing the engine, that shouldn't happen in any event, and it's a serious bug that has to be fixed. It's not a section of code that I've messed with: the only thing I did for that function was create the synonym. But I'll dive in this weekend and see what I can do.
Re: revxml
Posted: Fri Feb 07, 2014 7:39 pm
by malte
Hey Mark!
thanks for your attention in this matter. No, Actually I am trying to empty the node there. The attributes need to remain intact though and the node still needs to exist afterwards. Simply put I want something like this:
to become this:
The reason for this is, that I have no control over what is being put into the node. Might be any (UTF8) string, but might also be empty.
Best,
Malte
Re: revxml
Posted: Fri Feb 07, 2014 11:27 pm
by mwieder
OK - seems like a reasonable thing to do. It shouldn't crash anyway. I didn't change the code, so my guess is that this has always been a problem, it's just that nobody's tried this before. Shouldn't be too hard to track down, though.
Re: revxml
Posted: Sat Feb 08, 2014 6:04 am
by mwieder
Done. The problem is really within the third-party libxml library and should be fixed there. If I can figure out what's causing the problem in the code I'll submit a pull request with the changes.
In the meantime, I've patched the code in the revXML external to substitute a carriage return for the existing string, thus giving the same effect as deleting the original string. Fixed and pull request submitted.