PHP Notation3 Parser
This parser can parse a subset of n3, reporting triples to a callback function or constructing a RAP Model ( http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi )
Supported N3 features:
- Standard things, repeated triples ( ; and , ), blank nodes using [ ], self-reference (''<>'')
- @prefix mappings
- = maps to owl#sameAs
- a maps to rdf-syntax-ns#type
- Literal datytype- and xmlLanguageTag support
Un-supported N3 Features include:
- Reification using { }
- . and ^ operators for tree traversal
- Any log operators, like log:forAll etc.
This parser is based on n3.py from Epp released 2nd March, 2002. by Sean B. Palmer ( http://infomesh.net/2002/eep/20020302-013802/n3.py )
This parser is released under the GNU GPL license. ( http://www.gnu.org/licenses/gpl.txt )
History:
- 04-05-2005 toke() function improved by Hannes Gassert hannes.gassert@deri.org
- 03-25-2005 N3 list processing added by Hannes Gassert hannes.gassert@deri.org
- 12-06-2004 improved namespace handling added (tobias.gauss@web.de)
- 08-10-2004 Function for converting strings to its unicode NFC form. Benjamin Nowack <bnowack@appmosphere.com>
- 10-05-2004 Fixed bug with trailing space on qnames and space before ] parsin bug
- 11-27-2003 fixed problems with whithespaces at the end of bNodes
- 11-18-2003 Changed xml:language regex for supporting lang-tags like en-uk.
- 11-07-2003 Added "setFixBnodes" function. Sets, if Bnodes should be renamed to the BNODE_PREFIX constant.
- 10-27-2003 fixed problems in generateModel(), changed regEx for Literals.
- 10-24-2003 Added support for Literals with rdf:DataType and xml:Language Tags. URI-Self-Reference with ''<>'' is supported.
- 08-01-2003 Made compatible with new v6 MemModel.
- 07-31-2003 Function generateModel() added.
- 07-16-2003 Fixed bug with anon nodes alone on a line.
- 06-08-2003 Initial version converted from n3.py.