- From: MURATA Makoto (FAMILY Given) <EB2M-MRT@asahi-net.or.jp>
- Date: Thu, 09 Oct 2003 09:00:20 +0900
- To: www-forms@w3.org
- Cc: jjc@jclark.com, MURATA Makoto <eb2m-mrt@asahi-net.or.jp>
- Message-Id: <20031009084935.A69F.EB2M-MRT@asahi-net.or.jp>
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>
Attachments
- application/octet-stream attachment: repeatXFormsOnly.nrl
- application/octet-stream attachment: repeatHTMLOnly.nrl
- application/octet-stream attachment: htmlWithRepeat.xml
Received on Wednesday, 8 October 2003 20:05:53 UTC