SQF XInclude problem
This should cover W3C XML Schema, Relax NG and DTD related problems.
-
- Posts: 280
- Joined: Thu Nov 28, 2013 9:32 am
- Location: Hamburg/Germany
- Contact:
SQF XInclude problem
Hi,
I just made the following experiment with sqf in combination with xinclude:
main.xml:
included.xml:
schematron with sqf:
When all "Element" elements are in the same file the quickfixes work fine. But when executing the QuickFix "Adjust previous value to 1" for the file main.xml from above it is crippled to:
Regards,
Patrik
I just made the following experiment with sqf in combination with xinclude:
main.xml:
Code: Select all
<Root xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="included.xml"/>
<Element>2</Element>
</Root>
Code: Select all
<Element>3</Element>
Code: Select all
<sch:pattern>
<sch:rule context="Element[preceding-sibling::Element]">
<sch:let name="ThisValue" value="number(.)"/>
<sch:let name="PrevValue" value="number(preceding-sibling::Element[1])"/>
<sch:assert test="$ThisValue > $PrevValue" sqf:fix="AdjustThisValue AdjustPrevValue">
The value (<sch:value-of select="$ThisValue"/>) should be gerater then the previous value (<sch:value-of select="$PrevValue"/>).
</sch:assert>
<sqf:fix id="AdjustThisValue">
<sch:let name="NewValue" value="$PrevValue + 1"/>
<sqf:description>
<sqf:title>Adjust this value to <sch:value-of select="$NewValue"/></sqf:title>
</sqf:description>
<sqf:replace match="text()" select="$NewValue"/>
</sqf:fix>
<sqf:fix id="AdjustPrevValue">
<sch:let name="NewValue" value="$ThisValue - 1"/>
<sqf:description>
<sqf:title>Adjust previous value to <sch:value-of select="$NewValue"/></sqf:title>
</sqf:description>
<sqf:replace match="preceding-sibling::Element[1]/text()" select="$NewValue"/>
</sqf:fix>
</sch:rule>
</sch:pattern>
Code: Select all
<Root1>
<xi:include href="Included.xml"/>
<Element>2</Element>
</Root>
Patrik
-
- Posts: 388
- Joined: Thu Jul 01, 2004 12:29 pm
Re: SQF XInclude problem
Hi Patrik,
We do not support quick fixes in included documents. We have an issue on our issue tracker regarding this.
First we need support in oXygen to allow quick fixes to make modifications in other documents than the current on. Also, the fixes are not supported even if the error is reported in an included document. This is scheduled for the next release version.
Thank you for your feedback.
Best Regards,
Octavian
We do not support quick fixes in included documents. We have an issue on our issue tracker regarding this.
First we need support in oXygen to allow quick fixes to make modifications in other documents than the current on. Also, the fixes are not supported even if the error is reported in an included document. This is scheduled for the next release version.
Thank you for your feedback.
Best Regards,
Octavian
-
- Posts: 388
- Joined: Thu Jul 01, 2004 12:29 pm
Re: SQF XInclude problem
Hello,
Please note that the issue that you reported was fixed in oXygen 17.1.
We added support to execute Schematron Quick Fixes on documents other than the current one.
You can apply Schematron Quick Fixes over the nodes from referred documents (referred using XInclude or external entities), and you can access them as nodes in your current document.
Also, you can apply the quick fixes over other documents using the doc() function in the value of the match attribute. For example, you can add a new key in the keylist.xml file using the following operation:
Best Regards,
Octavian
Please note that the issue that you reported was fixed in oXygen 17.1.
We added support to execute Schematron Quick Fixes on documents other than the current one.
You can apply Schematron Quick Fixes over the nodes from referred documents (referred using XInclude or external entities), and you can access them as nodes in your current document.
Also, you can apply the quick fixes over other documents using the doc() function in the value of the match attribute. For example, you can add a new key in the keylist.xml file using the following operation:
Code: Select all
<sqf:add match="doc('keylist.xml')/KeyList" target="Key" node-type="element" select="Key2">
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service