[whatwg] Conformance requirements for IRIs

Henri Sivonen hsivonen at iki.fi
Tue Apr 25 03:53:56 PDT 2006


On Apr 17, 2006, at 19:14, Henri Sivonen wrote:

> Then I found
> http://jena.sourceforge.net/tmp/javadoc/com/hp/hpl/jena/iri/ 
> IRIFactory.html
> which provides a fascinating number of enforcement options. I could  
> write a custom datatype wrapper for it, but I don't know which  
> options to use.

I have tentatively settled on this:

         IRIFactory fac = new IRIFactory();
         fac.shouldViolation(true, false);
         fac.securityViolation(true, false);
         fac.dnsViolation(true, false);
         fac.mintingViolation(false, false); // XXX do we want these?
         fac.useSpecificationIRI(true);
         fac.useSchemeSpecificRules("http", true);
         fac.useSchemeSpecificRules("https", true);
         fac.useSchemeSpecificRules("ftp", true);
         fac.useSchemeSpecificRules("mailto", true);
         fac.useSchemeSpecificRules("file", true);
         fac.useSchemeSpecificRules("data", true);
         // XXX javascript?
         fac.setQueryCharacterRestrictions(false);

The schemes for which scheme-specific rules are enforced are the  
schemes WF 2.0 knows about (plus https).

-- 
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/





More information about the whatwg mailing list