- Hi Ben, I agree it would be a lot more efficient not to have 100+ if tests. We re looking at rewriting all the checks in schematron, which should let us doMessage 1 of 12 , Feb 1, 2012View Source
I agree it would be a lot more efficient not to have 100+ if tests. We’re looking at rewriting all the checks in schematron, which should let us do them more efficiently.
Senior Curriculum Specialist, Citrix Education
Mobile: +1 270.973.1393 | VoiceMail: +1 954.267.3136 (x23136) | Fax: +1.954 267.2544
One area for improvement is that there is a fair amount of coding overhead for each rule. This is especially true for terminology:
<xsl:if test=".//*[$excludes]/text()[contains(.,'click on')]">
<li class="genterm">click on - Use "click"</li>
There are just two pieces of unique information here:
Condition: click on
Message: Use "click"
The PowerShell code that you replaced was somewhat self-generating, in that the maintainer had to just specify those two items and the XPath expression and the evaluation were handled automatically. Would it be possible to list the conditions and associated messages in a separate file (or files) that could be evaluated at run time? That would be a nice division between the logic and data as well.
Member of Staff, Training & Documentation