RELAX NG with Embedded Schematron
Posted: Thu Apr 14, 2016 8:41 am
Hi,
I'm trying to validate DITA topic by RELAX NG including Schematron.
But validating the scenario "Validate Relax NG with embedded Schematron" does not report any expected errors.
Could you take a look at this? I'm new to both RELAX NG and Schematron.
The steps are following:
1. Download the my DITA-OT plug-in.
https://onedrive.live.com/redir?resid=9 ... file%2czip
2. Copy "com.antennahouse.dita.dita13.doctypes" to dita-ot-2.2.3/plugins folder.
3. Run "ant -f integrator.xml" or "dita -install".
4. Open dita-ot-2.2.3/plugins/com.antennahouse.dita.dita13.doctypes/ah_dita13_doctypes.xpr by oXygen.
5. Open testdata/test-rng-task.xml. The relevant RNG file is doctypes/rng/technicalContent/rng/task.rng and base/rng/floatfigDomain.rng.
6. Validate test-rng-task.xml via "Validate Relax NG with embedded Schematron" schenario.
Regards,
Toshihiko Makita
I'm trying to validate DITA topic by RELAX NG including Schematron.
But validating the scenario "Validate Relax NG with embedded Schematron" does not report any expected errors.
Could you take a look at this? I'm new to both RELAX NG and Schematron.
Code: Select all
<define name="floatfig.element">
<element name="floatfig" dita:longName="Floating figure">
<a:documentation> The Floating Figure element (<floatfig>) represents
an figure to be rendered as a floating figure that fits left or right side. The contents are almost same as fig
without <floatfig-group>.
</a:documentation>
<sch:pattern name="Test constraints on the floatfig element">
<sch:rule context="floatfig">
<sch:assert test="(string(@float) ne 'none') and exists(child::floatfig-group)">floatfig-group should not appear if floatfig/@float ne 'none'</sch:assert>
<sch:assert test="true()">Schematron floatfig-group test</sch:assert>
</sch:rule>
</sch:pattern>
<ref name="floatfig.content"/>
<ref name="floatfig.attlist"/>
</element>
</define>
1. Download the my DITA-OT plug-in.
https://onedrive.live.com/redir?resid=9 ... file%2czip
2. Copy "com.antennahouse.dita.dita13.doctypes" to dita-ot-2.2.3/plugins folder.
3. Run "ant -f integrator.xml" or "dita -install".
4. Open dita-ot-2.2.3/plugins/com.antennahouse.dita.dita13.doctypes/ah_dita13_doctypes.xpr by oXygen.
5. Open testdata/test-rng-task.xml. The relevant RNG file is doctypes/rng/technicalContent/rng/task.rng and base/rng/floatfigDomain.rng.
6. Validate test-rng-task.xml via "Validate Relax NG with embedded Schematron" schenario.
Regards,
Toshihiko Makita