Framework Content Association extension
Posted: Mon Dec 12, 2022 9:55 pm
Hi, I'm working on a framework that ideally can look at both an attribute of the root element and a child element of the root to determine the correct Document Type to associate with the document. For example:
Currently I use the Doc Association dialog to look at @schemaVer, but I need a way to look at element status to know if I use a Doc Type that uses a production Schematron validation which uses different rules and external resources than used for test data.
What I gather from this post is that I'll need an extension of type ro.sync.ecss.extensions.api.DocumentTypeCustomRuleMatcher to do the second part. I'm more of a Java hack than developer - do I need to just create a piece of code with like the second code snippet in the above post and zip it up in a jar file, add it on the Classpath tab and point to it in the Document Association dialog? It would parse out the status element value (assuming that's possible) and return a boolean as required by logic. Also, would that code need to do both pieces (looking at both @schemaVer and status) or is the result of the extension combined with what is set up in the dialog?
Thanks Scott
Code: Select all
<doc schemaVer="3.2">
<status>production</status>
....
</doc>
What I gather from this post is that I'll need an extension of type ro.sync.ecss.extensions.api.DocumentTypeCustomRuleMatcher to do the second part. I'm more of a Java hack than developer - do I need to just create a piece of code with like the second code snippet in the above post and zip it up in a jar file, add it on the Classpath tab and point to it in the Document Association dialog? It would parse out the status element value (assuming that's possible) and return a boolean as required by logic. Also, would that code need to do both pieces (looking at both @schemaVer and status) or is the result of the extension combined with what is set up in the dialog?
Thanks Scott