W3C home > Mailing lists > Public > public-forms@w3.org > September 2010

Update on NVDL for XHTML+XForms

From: Philip Fennell <Philip.Fennell@marklogic.com>
Date: Wed, 8 Sep 2010 01:26:39 -0700
To: "public-forms@w3.org" <public-forms@w3.org>
Message-ID: <D20C296D14127D4EBD176AD949D8A75A44262994@EXCHG-BE.marklogic.com>
Re-sending with a small ZIP attachment.
_____________________________________________________________________________________________


All,

I've been working on using NVDL to validate XHTML+XForms over the last week or so and I now have something to deliver from my initial efforts.

The starting point was to take the example, based on XForms 1.0, that is distributed with the oXygen XML editor and then extended it to use XForms 1.1. Also, in order to have a good range of XHTML+XForms examples I've chosen to use the XForms 1.1 test suite documents as input to the NVDL processor. Finally, I've used XProc as the framework to acquire the sample documents and validate them with NVDL using the XML Calabash XProc processor which supports an NVDL extension step that is not defined in XProc 1.0.

Note: I've been using the latest version of Calabash (0.9.23) within oXygen (11.2).

I've attached a ZIP file that contains a bundle of various RelaxNG and XML Schema documents along with some test XProc pipelines plus an oXygen project file (w3c.xpr) for those of you how use that IDE.

The main pipeline of interest is one that acquires the test documents and validates them:

W3C/Forms/test/xproc/nvdl-validate-xforms-test-suite.xpl

The pipeline will output a 'report' document but it is almost useless because, currently, Calabash does not reveal the error messages that are caught in a try/catch (grrrr) so it's more useful to look at the log messages. Note: you'll need to ensure that 'Show XProc messages' is selected in the XML/XProc preferences in oXygen.

The other pipeline:

W3C/Forms/test/xproc/save-xforms-test-suite.xpl

retrieves the test suite documents and inserts an XML Processing Instruction:



<?oxygen NVDLSchema="../../nvdl/xhtml-xforms11.nvdl"?>


above the root element that is used by oXygen to invoke NVDL validation... while you type!



Here are a few initial observations:

1) There is an issue with the: class, accesskey and navindex attributes, that I haven't yet managed to address with NVDL. NVDL, as the name suggests, is namespace-based but the three attributes in question are not bound to the host language's namespace (html:class) so they must be assumed to inherit the XForms namespace. However, the attributes definition was removed from the XForms Schema and left to the host language to define them. A problem no? There might be a way of dealing with them, in XForms elements, by use of NVDL Contexts.

2) Some test suite test will fail validation because they contain attribute values or content that is invalid with respect to the schema. No surprises there I suppose.

3) There appear to be a couple of errors in the tests themselves that are not there as tests for implementations (see the readme.txt in the ZIP).

4) I've added to the original NVDL the ability to accept xforms:repeat-* attributes in XHTML but one of the XForms tests (9.3.5.a) also includes them one in an xforms:group element and the XForms Schema does not allow this.

5) The XForms 1.1 spec. allows (optionally) for a nodeset attribute on xforms:header elements but this is not declared in the Schema.



Next steps:

1) See if the 'three amigos' attributes (class|accesskey|navindex) can be validated by NVDL without defining them in the XForms Schema.

2) Finish-off the NVDL for SVG+XForms and extended the validation pipeline to detect the namespace of the test document and select the appropriate NVDL document.

3) Look at XSLT+XHTML+XForms.

4) I might, when Calabash catches errors properly, generate an EARL document as the result of the validation, and then transform that into something readable ;-)




Regards


Philip Fennell

Consultant
MarkLogic Corporation

Mobile +44 (0) 7824 830 866

email  Philip.Fennell@marklogic.com<mailto:Philip.Fennell@marklogic.com>
<mailto:Philip.Fennell@marklogic.com>web    www.marklogic.com<http://www.marklogic.com/>



This e-mail and any accompanying attachments are confidential. The information is intended solely for the use of the individual to whom it is addressed. Any review, disclosure, copying, distribution, or use of this e-mail communication by others is strictly prohibited. If you are not the intended recipient, please notify us immediately by returning this message to the sender and delete all copies. Thank you for your cooperation.



Received on Wednesday, 8 September 2010 08:28:40 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 October 2013 22:06:54 UTC