Re: Validation against the XHTML2 RNG Schema as well as the XForms XSD schema

The repeat construct of XForms is an interesting challenge for schema languages.
Elements from two vocabularies may be interwoven, and we want to validate 
these two vocabularies independently.

I am happy to report that the following document fragment can be validated 
against XHTML2.rng as well as XForms-Schema.xsd.  

<table>
  <xforms:repeat id="lineset" nodeset="/my:lines/my:line">
    <tr>
      <td>
        <xforms:input ref="my:price">
          <xforms:label>Line Item</xforms:label>
        </xforms:input>
      </td>
      <td>
        <xforms:input ref="@name">
          <xforms:label>Name</xforms:label>
        </xforms:input>
      </td>
    </tr>
  </xforms:repeat>
</table>

We do not have to change XHTML2.rng or XForms-Schema.xsd.  We only have 
to provide two NRL schemas (see attachments).

Here is the result.  I still have an error about IDs, but this is a different problem.

bash-2.05b$ java -jar /relax/ng/jing-20030619/lib/jing.jar repeatHTMLOnly.nrl htmlWithRepeat.xml
c:\Murata\docpapers\xml2003\dsdl\htmlWithRepeat.xml:25:59: 
error: cvc-complex-type.3.2.2: Attribute 'id' is not allowed to appear in element 'xforms:repeat'.

bash-2.05b$ java -jar /relax/ng/jing-20030619/lib/jing.jar repeatHTMLOnly.nrl htmlWithRepeat.xml
java -jar /relax/ng/jing-20030619/lib/jing.jar repeatHTMLOnly.nrl htmlWithRepeat.xml
bash-2.05b$ 

Cheers,

-- 
MURATA Makoto (FAMILY Given) <EB2M-MRT@asahi-net.or.jp>

Received on Wednesday, 8 October 2003 20:05:53 UTC