Re: Test suite coordination

From
James Clark <>
Date
2001-06-15T03:47:47+00:00
ID
103101c0f54d$b4b56e90$
Thread
Re: Test suite coordination
> - sometimes, DTD is a part of the test. For example, to make sure that
>   the ENTITY type is correctly implemented, a test case must have its
>   own unique DTD.

This is a pretty marginal case, and more an issue for testing datatype
libraries than RELAX NG per se.

One way to handle this would be:

<!DOCTYPE testCases [
<!ENTITY e1 foo SYSTEM "whatever" NDATA n1>
<!ENTITY e2 foo SYSTEM "whatever" NDATA n1>
<!NOTATION n1 PUBLIC "whatever">
]>
<testCases>
  <testCase>
    <validPattern>
      <element name="foo">
        <data type="ENTITY" datatypeLibrary="http://www.w3.org/...">
      </element>
    </validPattern>
    <valid entities="e1 e2" notations="n1">
       <foo>e1</foo>
    </valid>
    <invalid entities="e2" notations="n1">
       <foo>e1</foo>
    </invalid>
  </testCase>
</testCases>

Another way would be an attribute on valid/invalid containing the literal
text of the DOCTYPE.

James