pyRdfa.rdfs

Separate module to handle vocabulary expansions. The L{cache} module takes care of caching vocabulary graphs; the L{process} module takes care of the expansion itself.

@organization: U{World Wide Web Consortiumhttp://www.w3.org} @author: U{Ivan Herman} @license: This software is available for use under the U{W3C® SOFTWARE NOTICE AND LICENSE}

 1# -*- coding: utf-8 -*-
 2"""
 3Separate module to handle vocabulary expansions. The L{cache} module takes care of caching vocabulary graphs; the L{process}
 4module takes care of the expansion itself.
 5
 6@organization: U{World Wide Web Consortium<http://www.w3.org>}
 7@author: U{Ivan Herman<a href="http://www.w3.org/People/Ivan/">}
 8@license: This software is available for use under the
 9U{W3C® SOFTWARE NOTICE AND LICENSE<href="http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231">}
10
11"""
12
13"""
14$Id: __init__.py,v 1.4 2012/08/20 13:15:28 ivan Exp $ $Date: 2012/08/20 13:15:28 $
15
16"""
17
18import sys
19import os
20
21import rdflib
22from rdflib import URIRef
23from rdflib import Literal
24from rdflib import BNode
25from rdflib import Namespace
26from rdflib import RDF as ns_rdf
27from rdflib import RDFS as ns_rdfs
28from rdflib import Graph
29
30from .. import RDFaError, pyRdfaError
31from .. import ns_rdfa, ns_xsd, ns_distill
32
33VocabCachingInfo = ns_distill["VocabCachingInfo"]
34
35
36# Error message texts
37
38err_outdated_cache =            "Vocab document <%s> could not be dereferenced; using possibly outdated cache"
39err_unreachable_vocab =         "Vocab document <%s> could not be dereferenced"
40err_unparsable_Turtle_vocab =   "Could not parse vocab in Turtle at <%s> (%s)"
41err_unparsable_xml_vocab =      "Could not parse vocab in RDF/XML at <%s> (%s)"
42err_unparsable_ntriples_vocab = "Could not parse vocab in N-Triple at <%s> (%s)"
43err_unparsable_rdfa_vocab =     "Could not parse vocab in RDFa at <%s> (%s)"
44err_unrecognised_vocab_type =   "Unrecognized media type for the vocab file <%s>: '%s'"
VocabCachingInfo = rdflib.term.URIRef('http://www.w3.org/2007/08/pyRdfa/vocab#VocabCachingInfo')
err_outdated_cache = 'Vocab document <%s> could not be dereferenced; using possibly outdated cache'
err_unreachable_vocab = 'Vocab document <%s> could not be dereferenced'
err_unparsable_Turtle_vocab = 'Could not parse vocab in Turtle at <%s> (%s)'
err_unparsable_xml_vocab = 'Could not parse vocab in RDF/XML at <%s> (%s)'
err_unparsable_ntriples_vocab = 'Could not parse vocab in N-Triple at <%s> (%s)'
err_unparsable_rdfa_vocab = 'Could not parse vocab in RDFa at <%s> (%s)'
err_unrecognised_vocab_type = "Unrecognized media type for the vocab file <%s>: '%s'"