Schematron: Replace on root element not working

This should cover W3C XML Schema, Relax NG and DTD related problems.
Patrik
Posts: 216
Location: Hamburg/Germany

Schematron: Replace on root element not working

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: 122

Re: Schematron: Replace on root element not working

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

Return to “XML Schemas”

Who is online

Users browsing this forum: No registered users and 0 guests