toXML | index /home/syosi/cvs-trunk/WWW/2000/10/swap/toXML.py |
$Id: toXML.html,v 1.22 2004/11/10 00:50:21 syosi Exp $
This module implements basic sources and sinks for RDF data.
It defines a stream interface for such data.
It has a command line interface, can work as a web query engine,
and has built in test(), all of which demosntrate how it is used.
To make a new RDF processor, subclass RDFSink.
See also:
Notation 3
http://www.w3.org/DesignIssues/Notation3
Closed World Machine - and RDF Processor
http;//www.w3.org/2000/10/swap/cwm
To DO: See also "@@" in comments
Internationlization:
- Decode incoming N3 file as unicode
- Encode outgoing file
- unicode \u (??) escapes in parse
- unicode \u (??) escapes in string output
Note currently unicode strings work in this code
but fail when they are output into the python debugger
interactive window.
______________________________________________
Module originally by Dan Connolly.
TimBL added RDF stream model.
Modules | ||||||
|
Classes | ||||||||||||||||||
|
Functions | ||
|
Data | ||
ADDED_HASH = '#' ALL4 = (0, 1, 2, 3) ANONYMOUS = 3 CONTEXT = 0 DAML_LISTS = 1 DAML_NS = 'http://www.daml.org/2001/03/daml+oil#' DAML_sameAs = (0, 'http://www.daml.org/2001/03/daml+oil#sameAs') DAML_sameAs_URI = 'http://www.daml.org/2001/03/daml+oil#sameAs' DPO_NS = 'http://www.daml.org/2001/03/daml+oil#' FORMULA = 1 LITERAL = 2 List_NS = 'http://www.daml.org/2001/03/daml+oil#' Logic_NS = 'http://www.w3.org/2000/10/swap/log#' N3_Empty = (0, 'http://www.daml.org/2001/03/daml+oil#Empty') N3_List = (0, 'http://www.daml.org/2001/03/daml+oil#List') N3_first = (0, 'http://www.daml.org/2001/03/daml+oil#first') N3_forAll_URI = 'http://www.w3.org/2000/10/swap/log#forAll' N3_forSome_URI = 'http://www.w3.org/2000/10/swap/log#forSome' N3_nil = (0, 'http://www.daml.org/2001/03/daml+oil#nil') N3_rest = (0, 'http://www.daml.org/2001/03/daml+oil#rest') NCNameChar = 0 NCNameStartChar = 1 NODE_MERGE_URI = 'http://www.w3.org/2000/10/swap/log#is' OBJ = 3 PARTS = (1, 2, 3) PRED = 1 RDF_NS_URI = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' RDF_spec = 'http://www.w3.org/TR/REC-rdf-syntax/' RDF_type = (0, 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type') RDF_type_URI = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type' SUBJ = 2 SYMBOL = 0 XML_NS_URI = 'http://www.w3.org/XML/1998/namespace' option_noregen = 0 parsesTo_URI = 'http://www.w3.org/2000/10/swap/log#parsesTo' |