Schematron and include problem.
Oxygen general issues.
-
- Posts: 2
- Joined: Fri Jun 22, 2007 3:15 pm
Schematron and include problem.
Hi all,
in ISO Schematron there is an include element.
The problem occurs when I define a Schematron schema separately (e.g. StronA.sch) which contains an abstract pattern. Like:
When I include StronA.sch in StronZ.sch and reference the ID of that abstract pattern it gives an error in the editor when opened at StronZ.sch.
The error is: E [Xerces] cvc-id.1: There is no ID/IDREF binding for IDREF 'check_Value_Present'.
I think this should not be the case. Using StronZ.sch to validate an XML document works without problems despite this error.
I hope I have been clear.
Regards,
Stijn.
in ISO Schematron there is an include element.
The problem occurs when I define a Schematron schema separately (e.g. StronA.sch) which contains an abstract pattern. Like:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<pattern abstract="true" id="check_Value_Present" xmlns="http://purl.oclc.org/dsdl/schematron">
<rule context="$possiblyEmptyElement">
<assert test="text()[normalize-space(.)]">
A value should be present, because the "<name/>" element cannot be empty.</assert>
</rule>
</pattern>
The error is: E [Xerces] cvc-id.1: There is no ID/IDREF binding for IDREF 'check_Value_Present'.
I think this should not be the case. Using StronZ.sch to validate an XML document works without problems despite this error.
I hope I have been clear.
Regards,
Stijn.
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi,
Currently oXygen performs the validation of Schematron files against an XML Schema for Schematron. When you have included files there may be cases as in your example when the IDs are defined in another file and thus (although the resulting schema after solving the includes is valid against the schema) the files may not be valid against the schema for Schematron (as the IDs are not defined in the same file).
We will consider handling these cases in some way in the future - the best approach I think is to make the Schematron validation to get the document with includes expanded and to validate that against the schema - then for an included file that is not valid by itself you can configure a validation scenario and validate from the including file.
Best Regards,
George
Currently oXygen performs the validation of Schematron files against an XML Schema for Schematron. When you have included files there may be cases as in your example when the IDs are defined in another file and thus (although the resulting schema after solving the includes is valid against the schema) the files may not be valid against the schema for Schematron (as the IDs are not defined in the same file).
We will consider handling these cases in some way in the future - the best approach I think is to make the Schematron validation to get the document with includes expanded and to validate that against the schema - then for an included file that is not valid by itself you can configure a validation scenario and validate from the including file.
Best Regards,
George
George Cristian Bina
-
- Posts: 2
- Joined: Fri Jun 22, 2007 3:15 pm
Thanks for the quick reply!
Yeah, I think just having 2 separate schematron validation files and validating the XML document with both is a solution.
But I do like having some kind of hierarchy (especially for lets say 'base types') and then including and reusing them when needed - like the validation of an address. The same goes for building up a nice hierarchy when creating XML Schema, for which 'includes' and 'imports' of course do work inside Oxygen.
Thanks again for your time,
regards,
Stijn.
PS: I really enjoy using Oxygen, keep up the good work!
Yeah, I think just having 2 separate schematron validation files and validating the XML document with both is a solution.
But I do like having some kind of hierarchy (especially for lets say 'base types') and then including and reusing them when needed - like the validation of an address. The same goes for building up a nice hierarchy when creating XML Schema, for which 'includes' and 'imports' of course do work inside Oxygen.
Thanks again for your time,
regards,
Stijn.
PS: I really enjoy using Oxygen, keep up the good work!
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