XSLT Checks / result document

Hi all,

while I'm writing the NON-TEXT_ALTERNATIVES XSLT,
I have an enhancement/question at the result XML:

a) if there is at least one VALID and no FAIL result, the test is valid
b) for each failure, generate a FAIL result
c) optional return the code fragment that generates the FAIL result
d) optional return a example code for a valid result (stored in a  
separate XML)

Example:
------------------------------------------------------------------------ 
---------
<?xml version="1.0" encoding="UTF-8"?>
<!-- the name should in sync with the BP document ->
<test xmlns="http://moki.mobi/2007/v0.1" xmlns:html="http:// 
www.w3.org/1999/xhtml" name="NON-TEXT_ALTERNATIVES">
   <!-- if there is at least one valid and no fail, the test is valid  
-->
   <result outcome="VALID"/>

   <!-- for each error element, generate a FAIL result -->
   <result outcome="FAIL">
     <msg>
       <!--
            message comes from seperate messages.xml:
           <messages xmlns="http://moki.mobi/2007/v0.1">
              <msg lang="en" type="warning|error"  
msg="message_id">text</msg>
              ...
           </messages>
        -->
       alt attribute is not present
     </msg>
     <!-- code is optional -->
     <code>
       <!-- the code from the source document, that generates the  
error message -->
       <img src="..."/>
     </code>
   </result>

   <result outcome="FAIL">
     <msg>
       alt attribute consists only of white space
     </msg>
     <!-- code is optional -->
     <code>
       <img src="..." alt=" "/>
     </code>
    <!-- example to generate a valid result, source: examples.xml
           <examples xmlns="http://moki.mobi/2007/v0.1">
              <example id="example_id">
                <img src="image.png" alt="example image" width="100"  
height="40"/>
              </example>
              ...
           </examples>
     -->
     <example>
       <img src="image.png" alt="example image" width="100"  
height="40"/>
     </example>
   </result>

   <!-- ... -->

   <!-- only a sample -->
   <warning>
     <msg>warning message</msg>
     <code>
      markup code with warning
     </code>
   </warning>
</test>
---------------------------------------------
Any suggestions/improvements/comments?
I have changed one test to output format, if anyone want a code  
sample I can send this separate.
Thanks!

Cheers,
  Roland

Received on Sunday, 20 May 2007 09:44:44 UTC