Schematron: Replace on root element not working

This should cover W3C XML Schema, Relax NG and DTD related problems.
Patrik
Posts: 240
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Schematron: Replace on root element not working

Post by Patrik » Thu Feb 18, 2016 9:19 am

Applying this (simplified) quick fix causes an error in oXygen:

Code: Select all

<sqf:fix id="test">
<sqf:description>
<sqf:title>replace root element</sqf:title>
</sqf:description>
<sqf:replace match="/*" select="."/>
</sqf:fix>
error:

Code: Select all

Cannot perform the quick fix: Cannot execute operation: Delete Node. Cause: ro.sync.xml.xpath.g: XPath failed due to: Finding root of tree: the context item is absent
Patrik

tavy
Posts: 228
Joined: Thu Jul 01, 2004 12:29 pm

Re: Schematron: Replace on root element not working

Post by tavy » Thu Feb 18, 2016 10:19 am

Hi Patrik,

I added an issue on our issue tracker regarding this problem. It is a particular case and the replace operation needs to be implemented differently.

Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply