Re: anyURI tests in the XML Schema test suite

Hi David, hi all,

I just had a talk with Chris Lilley about the test suite issue. He had a 
nice idea which could make the life of test suite developers easier:
You could just change your existing tests with respect to IRI specific 
properties of anyURI (see below) automatically: 1) and 2)  in the path 
part  and 3) in the domain part, i.e. via a perl script or with the xslt 
2.0 analyze-string function, i.e. s.t. like
|

<xsl:analyze-string select="*/@anyURI" regex="http:////"|>
<xsl:matching-substring>
<xsl:value-of select="concat('http://','suçon.'))"/>
</xsl:matching-substring>
<xsl:non-matching-substring>
<xsl:value-of select="."/>
</xsl:non-matching-substring>
</xsl:analyze-string>

This creates tests for 3). If e.g. the value of "@anyURI" was 
"http://example.com" , it will now be "http://suçon.example.com"

Is this useful for you?

Best, Felix.

Felix Sasaki wrote:

> Dear  David,
>
> I had a look at the  test suite for anyURI in the xmlschema data types 
> spec. (2nd. edition). First, as some sample IRIs, you could use [1],  
> [2] and [3], which are from the i18n test page. Here are some issues 
> and examples which might be helpful for test development (see sec. 3.1 
> of the IRI spec. [4]):
>
> 1) Test for printable characters which are not allowed in URIs, i.e. 
> namely "<", ">", '"', space,  "{", "}", "|", "\", "^", and "`":
> http://example.com/{my}page.html
>
> 2) Test for Normalization Form C:
> A character sequenze suçon, e.g. in http:example.com/suçon
> Before normalization: suçon is e.g. encoded as (U+0073 U+0075 U+0063 
> U+0327 U+006F U+006E). After normalization: suçon is encoded as 
> (U+0073 U+0075 U+00E7 U+006F U+006E).
>
> 3) Test for ToASCII operation (for the Domain Name):
> http://résumé.example.org the domain name is escaped as
> http://r&#xE9;sum&#xE9;.example.org
>
>
> I have the impression that you would need IRI tests for the facets 
> enumeration, pattern, length, whitespace. Do you need more help in 
> formulating tests, except from the material above? Please tell me / us.
>
> Best, Felix.
>
> David Ezell wrote:
>
>> Dear i18n-core:
>>
>> I took an action from the XML CG some time back:
>>  
>>
>>> ACTION: DE look at the schema test suite for anyURI tests, and 
>>> determine which ones already test IRI or could be extended to test IRI.
>>>   
>>
>>
>> While there are tests in the XML Schema test suite for anyURI, it 
>> doesn't appear that any of them do anything specific as far as 
>> testing for conformance with RFC 2396.  That means the tests should 
>> work as well for IRIs as they do currently for URIs. 
>> Further, the XML Schema WG continues to discuss how to support RFC 
>> 3897 in XML Schema 1.1.  Once that's settled, we can consider 
>> upgrading the tests.  Help in formulating the tests is always welcome 
>> :-) [1].
>>
>> Best regards,
>> David Ezell
>> Chair, XML Schema WG
>>
>> [1] http://www.w3.org/XML/Schema#resources
>>
>>
>>
>>
>>
>>
>>
>>  
>>
> [1] http://www.w3.org/International/tests/sec-idn-1
> [2] http://www.w3.org/International/tests/sec-idn-2
> [3] http://www.w3.org/International/tests/sec-iri-3
> [4] http://www.ietf.org/rfc/rfc3987.txt
>

Received on Monday, 6 June 2005 09:40:03 UTC