A. Clarke wrote: > > I figured it out in the end, after finding the docbook samples. There was an > error in the markup of my schematron file (XMLmind should report an error) > and also the schematron namespace I was using is not apparently supported by > XMLmind. Again, an error would be helpful. >
A. Clarke wrote: > I have followed the instructions in the configuration guide for adding a > schematron schema, but it does not seem to be evaluated. Perhaps I am > misunderstanding something? > > I have tried adding this code to my global customization file in > XMLEditor4/addon, and also to the xxe file for my document type in > XMLEditor4/addon/data_dictionary: > > <cfg:schematron > location = "iso_schematron.xml" > phase = "#ALL" > evaluatePhase = "false"/> > > My schematron looks like this: > > <?xml version="1.0" encoding="utf-8"?> > <iso:schema > xmlns="http://purl.oclc.org/dsdl/schematron" > queryBinding='xslt2' > schemaVersion='XXXX'> > <iso:title>Test ISO schematron file. Introduction mode</iso:title> > <iso:ns prefix='xxxx' uri='XXXXX'/> > > <iso:pattern> > <iso:rule context="xxxx:complex-type"> > <iso:assert test="XXXXXXX">Field names must be unique for each complex > type.</iso:assert> > </iso:rule> > </iso:pattern> > > </iso:schema> > > iso_schematron.xml is located in the same directory as the configuration file. > > When I press the validate button the schematron is not executed. Even when I > add invalid markup to the schematron file such as <&> no error is reported > by XXE. > * Before being a schematron schema, a schematron document is supposed to be a well-formed XML document. This is not the case of what follows because the "iso" prefix is not defined: --- <iso:schema xmlns="http://purl.oclc.org/dsdl/schematron" xmlns:ddml="http://www.markit.com/data_dictionary" queryBinding='xslt2' schemaVersion='ISO19757-3'> --- * queryBinding='xslt2' is definitely not supported. We only support queryBinding="xslt". See http://www.xmlmind.com/xmleditor/_distrib/doc/configure/schematron.html --- XXE built-in Schematron implementation supports both ISO Schematron or Schematron 1.5 schemas. The only supported query language binding is XSLT 1 (queryBinding="xslt"). --- * XXE built-in Schematron implementation supports both ISO Schematron or Schematron 1.5 schemas. This means that a schematron must start with: --- <schema xmlns="http://purl.oclc.org/dsdl/schematron" --- (with a prefix) --- <foo:schema xmlns:foo="http://purl.oclc.org/dsdl/schematron" --- or with: --- <schema xmlns="http://www.ascc.net/xml/schematron" --- (with a prefix) --- <bar:schema xmlns:bar="http://www.ascc.net/xml/schematron" --- * It's true that XXE does not report an error when the schematron specified in cfg:schematron configuration element is incorrect. However we provide a command-line tool, xmltool, which allows to validate your schematron and test it against document instances. See http://www.xmlmind.com/xmleditor/_distrib/doc/xmltool/index.html We strongly recommend to use this xmltool on all sorts of schemas before attempting to use them in XXE. If the schematron is an ISO one, a cruder alternative is to simply open the schematron in XXE and it will tell you if it's not only well-formed but also valid in respect with the grammar of schematron schemas. * In fact, we could not imagine that XML consultants could specify non-well-formed/invalid/untested schematrons in configuration files, that's why we didn't bother reporting errors. But of course, this experience shows us that we were wrong. We'll of course report errors in future versions of XXE. -- XMLmind XML Editor Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xmleditor-support

