Re: Problem with pyrdfa3 CLI distiller

On May 19, 2012, at 7:11 AM, "Ivan Herman" <ivan@w3.org> wrote:

> Tom,
> 
> - with a suffix of .shtml, the (local) file is not considered to be HTML5. (Maybe this is a bug, actually, I am not sure what .shtml is usually used for. Not knowing what else to do, the distiller uses the Python xml parser. However, the file itself has a <!DOCTYPE html> dtd, which does not define the entities of the sort &nbsp; and runs into a parser error. In other words, the content does not even get to the core RDFa distiller
> 
> - if you rename the file .html, then it compiles and produces RDFa. Note that the RDFa distiller also generates warnings:
> 
> 
> [] a pyrdfa:IncorrectPrefixDefinition,
>        rdfa:Warning;
>    dcterm:date "2012-05-19T14:06:27.976027"^^xsd:dateTime;
>    dcterm:description "[In element 'html'] The usage of 'xmlns' for prefix definition is deprecated; please use the 'prefix' attribute instead (definition for 'xhtml')" .
> 
> [] a pyrdfa:IncorrectPrefixDefinition,
>        rdfa:Warning;
>    dcterm:date "2012-05-19T14:06:27.892173"^^xsd:dateTime;
>    dcterm:description "[In element 'html'] The usage of 'xmlns' for prefix definition is deprecated; please use the 'prefix' attribute instead (definition for 'xhtml')" .
> 
> indeed, you have the xmlns:xhtml definition in the header which is considered to be a prefix definition and that is, by now, deprecated (I do not know why the warning is generated twice, that is a mistake of mine that I have not found out yet).

I thing the xmlns:html is there because of XSLT, and I didn't know enough about it to have it removed from the output. Still, it does no harm,

I'm not aware of any server-side changes that are needed to the file, so perhaps the .shtml is just a legacy that can be removed.

Gregg

> Ivan
> 
> P.S. I will explore the .shtml issue, maybe I should accept that as .html by default. 
> 
> 
> 
> On May 18, 2012, at 22:28 , Thomas Baker wrote:
> 
>> The localRdfa.py script from [1] gets the following error message when I run 
>> $ localRdfa.py index.shtml from [2]:
>> 
>>   @prefix dcterm: <http://purl.org/dc/terms/> .
>>   @prefix ht: <http://www.w3.org/2006/http#> .
>>   @prefix rdfa: <http://www.w3.org/ns/rdfa#> .
>>   @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
>> 
>>   [] a rdfa:Error;
>>       dcterm:date "2012-05-18T14:41:23.210220"^^xsd:dateTime;
>>       dcterm:description "undefined entity: line 445, column 44";
>>       rdfa:context [ a ht:Request;
>>               ht:requestURI "index.shtml" ],
>>           [ a ht:Response;
>>               ht:responseCode <http://www.w3.org/2006/http#400> ] .
>> 
>> Tom
>> 
>> [1] https://github.com/RDFLib/pyrdfa3
>> [2] https://raw.github.com/dublincore/website/master/build/html/dcmi-terms/index.shtml
>> 
>> -- 
>> Tom Baker <tom@tombaker.org>
>> 
> 
> 
> ----
> Ivan Herman, W3C Semantic Web Activity Lead
> Home: http://www.w3.org/People/Ivan/
> mobile: +31-641044153
> FOAF: http://www.ivan-herman.net/foaf.rdf
> 
> 
> 
> 
> 
> 

Received on Saturday, 19 May 2012 14:29:18 UTC