Page 1 of 1

Support for ISO Schematron subject attribute

Posted: Wed Apr 02, 2008 12:45 pm
by jelovirt
AFAICT Oxygen 9.1 does not implement the subject attribute. Current implementation highlights the context node and while rules can be rewritten to use a different context node, for performance and clarity reasons using subject attribute would be useful.

Example from a (simplified) DITA rule:

Code: Select all


<pattern>
<rule context="topic"
subject="body/p">
<report test="not(shortdesc | abstract) and
count(body/*) = 1 and
body/p">
In cases where a topic contains only one paragraph, then it is preferable to include this text in the shortdesc element and leave the topic body empty.
</report>
</rule>
</pattern>

Re: Support for ISO Schematron subject attribute

Posted: Wed Apr 02, 2008 3:14 pm
by sorin_ristache
Hello,

Yes, the subject attribute is useful for creating a more precise context in an ISO Schematron rule but this attribute is not implemented yet. However I added your request to our issue tracker for a future version of oXygen.


Thank you,
Sorin

Re: Support for ISO Schematron subject attribute

Posted: Fri Mar 11, 2016 8:12 pm
by whyme
Although @subject in a Schematron <assert> or <report> is now supported in oXygen, I'm finding that variables in the XPath expression are not resolved, e.g.,

Code: Select all

<report test="exists($ids-in-error)" subject="*[@xml:id = $ids-in-error]">This element is in error.</report>
The first $ids-in-error resolves fine but the second doesn't. Is variable support for @subject something oXygen would consider in the future?

Re: Support for ISO Schematron subject attribute

Posted: Mon Mar 14, 2016 1:41 pm
by tavy
Hello,

Yes, we do not support variables in the value of the @subject attribute. You can use an XPath expression that does not contain variables.
I added an issue on our issue tracker regarding this problem. We will notify you when it will be solved.

Best Regards,
Octavian