Support for ISO Schematron subject attribute

Are you missing a feature? Request its implementation here.
jelovirt
Posts: 84
Joined: Tue Oct 11, 2005 9:17 am
Location: Helsinki, Finland
Contact:

Support for ISO Schematron subject attribute

Post 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>
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Support for ISO Schematron subject attribute

Post 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
whyme
Posts: 89
Joined: Fri Mar 08, 2013 8:58 am

Re: Support for ISO Schematron subject attribute

Post 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?
tavy
Posts: 363
Joined: Thu Jul 01, 2004 12:29 pm

Re: Support for ISO Schematron subject attribute

Post 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
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply