Schematron framework negates CSS from other frameworks
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 2
- Joined: Tue Apr 06, 2021 3:26 pm
Schematron framework negates CSS from other frameworks
I'm new to frameworks. I wrote a schematron checker and want to incorporate it in a framework extension. There is a framework extension that is added by our DITA CCMS vendor that is being masked by my new framework. As one example, a read-only topic is supposed to show in the editor with a gray background. If my framework extension is checked, there is no gray background. The checker works fine and if I use a URL at the top of the topic instead of a framework, everything works as expected. Can you tell me if there is a setting I should look for? My current settings:
Using Oxygen XML Author 21.1
Framework extends DITA framework
Have tried as both a global and a project option. The project option works sometimes, seemingly randomly.
Author->CSS - have tried all combinations
Validation - added rules location to DITA scenario
Have tried extending different frameworks (Schematron and XSLT) and tried changing the priority. Lowering the priority from Normal to Low makes the CSS work right, but the schematron won't run when you click Validate.
Any suggestions?
Dan
Using Oxygen XML Author 21.1
Framework extends DITA framework
Have tried as both a global and a project option. The project option works sometimes, seemingly randomly.
Author->CSS - have tried all combinations
Validation - added rules location to DITA scenario
Have tried extending different frameworks (Schematron and XSLT) and tried changing the priority. Lowering the priority from Normal to Low makes the CSS work right, but the schematron won't run when you click Validate.
Any suggestions?
Dan
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Schematron framework negates CSS from other frameworks
Hi Dan,
As a short overview, all the frameworks defined in the "Document Type Association" page have association rules.
When Oxygen opens an XML document, it goes through that list of document types from top to bottom, the first document type association which matches the XML document (which has association rules matching the document) is used for validation, content completion, editing. No other framework is used.
Now, a framework can extend another framework, and the elegant way of adding Schematron validation to the DITA framework is by extending it:
https://blog.oxygenxml.com/topics/shari ... rules.html
which you have probably already done.
But the problem in this case is the CMS already has its framework extension and Oxygen uses either the CMS's framework extension or your framework extension, depending on the priority, on which comes first in the list. But Oxygen will never use both of them.
In general a framework can extend another framework, but it cannot extend a framework extension, because if it could, you could extend your framework from the CMS's framework instead of using the base "DITA" framework.
In the latest Oxygen 23.1 version we added support for a framework configuration script which can be used to extend a framework extension, so in Oxygen 23.1 this could possibly be made to work. But you are probably stuck with 21.1 because the CMS might not officially support Oxygen 23.1.
Here's a possible alternative:
If in the "Document Type Association" page you edit the base "DITA" framework configuration, in the "Validation" tab you will find a default validation scenario named "DITA". If you edit it, it has about 4 different validation stages, the second one of them being a Schematron validation using "${framework}/resources/dita-1.2-for-xslt2-mandatory.sch" which resides in the "OXYGEN_INSTALL_DIR/frameworks/dita/resources/dita-1.2-for-xslt2-mandatory.sch".
But we need to avoid changing that Schematron directly, fortunately Oxygen always locates schemas going through its XML catalog support:
https://www.oxygenxml.com/doc/versions/ ... alogs.html
So:
-Create a folder somewhere containing your custom Schematron file.
-Create in the same folder a new XML catalog file named for example "catalog.xml" with the contents:
-In the Oxygen Preferences->"XML Catalogs" page add a reference to this custom "catalog.xml".
- Open a DITA topic and validate it, Oxygen should use the indirection in the custom catalog.xml to use your custom.sch instead of the original dita-1.2-for-xslt2-mandatory.sch.
Regards,
Radu
As a short overview, all the frameworks defined in the "Document Type Association" page have association rules.
When Oxygen opens an XML document, it goes through that list of document types from top to bottom, the first document type association which matches the XML document (which has association rules matching the document) is used for validation, content completion, editing. No other framework is used.
Now, a framework can extend another framework, and the elegant way of adding Schematron validation to the DITA framework is by extending it:
https://blog.oxygenxml.com/topics/shari ... rules.html
which you have probably already done.
But the problem in this case is the CMS already has its framework extension and Oxygen uses either the CMS's framework extension or your framework extension, depending on the priority, on which comes first in the list. But Oxygen will never use both of them.
In general a framework can extend another framework, but it cannot extend a framework extension, because if it could, you could extend your framework from the CMS's framework instead of using the base "DITA" framework.
In the latest Oxygen 23.1 version we added support for a framework configuration script which can be used to extend a framework extension, so in Oxygen 23.1 this could possibly be made to work. But you are probably stuck with 21.1 because the CMS might not officially support Oxygen 23.1.
Here's a possible alternative:
If in the "Document Type Association" page you edit the base "DITA" framework configuration, in the "Validation" tab you will find a default validation scenario named "DITA". If you edit it, it has about 4 different validation stages, the second one of them being a Schematron validation using "${framework}/resources/dita-1.2-for-xslt2-mandatory.sch" which resides in the "OXYGEN_INSTALL_DIR/frameworks/dita/resources/dita-1.2-for-xslt2-mandatory.sch".
But we need to avoid changing that Schematron directly, fortunately Oxygen always locates schemas going through its XML catalog support:
https://www.oxygenxml.com/doc/versions/ ... alogs.html
So:
-Create a folder somewhere containing your custom Schematron file.
-Create in the same folder a new XML catalog file named for example "catalog.xml" with the contents:
Code: Select all
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<uriSuffix uriSuffix="dita-1.2-for-xslt2-mandatory.sch" uri="mySchematron.sch"/>
</catalog>
- Open a DITA topic and validate it, Oxygen should use the indirection in the custom catalog.xml to use your custom.sch instead of the original dita-1.2-for-xslt2-mandatory.sch.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
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