- From: Jeremy Carroll <jjc@hplb.hpl.hp.com>
- Date: Tue, 21 Dec 2004 11:38:31 +0000
- To: public-iri@w3.org
Here is a sketch of a test suite for IRI (no content just a design). Test types: Is an IRI. - test input data: a string - successful output: 'absolute' or 'relative' (maybe we need to distinguish between the generic syntax and the others too) Is not an IRI. - test input data: a string - successful output: 'no' Relative IRI resolution. - test input data: an absolute base IRI and a relative IRI - test output data: an absolute IRI being the resolution IRI to URI mapping: - test input data: an IRI - test output data: the corresponding URI Tests should exercise areas known to be difficult: - e.g. I would have difficulty with Unicode higher than 2.1 is it, because I work in Java, typically 1.4/1.3 where the unicdoe support does not range beyond 16bits. - e.g. the role of % in IRIs should be clear from the tests, particularly pertinent to the IRI to URI mapping one - e.g. spaces and similar should be tested, since this is an area where the current IRI-ID and specs like XLink, XMLSchema/anyURI differ The test suite is enhanced by various mapping schemes that take the test data, say in plain text files, or in a simple XML format, and produce test data in some other format. I am happy to do an RDF/XML mapping, output would probably end up similar to RDF test cases. With an RDF mapping some of the cases would not be fully exercised, since e.g. the RDF specs do not require the system to distinguish between a relative IRI without a base present, and a nonsense string. Both are simply errors. I would expect similar limitations in any mapping to any other IRI application. It may be worth having a number (all?) of the test IRIs be resolvable IRIs on the W3C site, so that simple xhtml application can be built that actually works, if the browser supports IRI. The application should be very simple with automatically generated web pages. Conventionally on W3C site 'bad examples' are from example.{org,com,net} which may be suboptimal if we want an error other than 404. e.g. href="http://example.com/foo bar" should fail, if the href is meant to be an IRI because of a syntax error (space in IRI) rather than a 404. This wouldn't lead to a comprehensive test suite, since some MUSTs are not covered, e.g. to do with bidi and rendering. Also need to pay attention to some MAYs, since a few (e.g. to do with spaces) water down some of the grammar. There seem to be quite a lot of examples already in the IRI-ID, that could jsust be copied over in full. Jeremy
Received on Tuesday, 21 December 2004 11:38:38 UTC