revxml
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark
Re: revxml
The revxml xpath additions @mwieder has contributed will appear in 6.5-dp-1 which we're hoping to get out asap
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: revxml
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.
You cannot make another post so soon after your last.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: revxml
@mwieder: Already done
You cannot make another post so soon after your last.
You cannot make another post so soon after your last.
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: revxml
Thanks. Yes, I'm pawing through the changes now, and I see those done.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: revxml
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?
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?
-
- VIP Livecode Opensource Backer
- Posts: 3990
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: revxml
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
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
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.
Thanks Bernd.
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: revxml
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.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: revxml
Thanks Mark! That was what I was hoping. It is a bug then, I will set up a demo stack.
All the best!
Malte
All the best!
Malte
Re: revxml
Oh the joys of debugging. Of course the atomic recipe stack does not crash.
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: revxml
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.
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.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: revxml
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
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:
Code: Select all
<foo bar="baz">boo</foo>
Code: Select all
<foo bar="baz"/>
Best,
Malte
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: revxml
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.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: revxml
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.
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.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev