The Nokogiri-based reader suite for the RDF.rb environment. This version offers substantial performance gains, due to general improvements in RDF.rb as well as a number of improvements in the readers:
General improvements
- Readers save prefix definitions in
:prefixes. Writers use:prefixes, or:standard_prefixesto generate QNames. - Readers supports
:canonicalizeand:validate options
- New parser based on Tim-BL’s Predictive Parser supports quoted graphs and variables.
- Stream-based reader can process an indefinite length input file, vs. the older Treetop-based reader that was a two-pass parser.
- Substantial performance improvement over previous version, running at about x statements/second on an iMac.
- From History:
-
- New Predictive-Parser based N3 Reader, substantially faster than previous Treetop-based parser
- RDF.rb 0.3.0 compatibility updates
- Remove literal_normalization and qname_hacks, add back uri_hacks (until 0.3.0)
- Use
nilfor default namespace - In Writer
- Use only
:prefixesfor creating QNames. - Add
:standard_prefixesand:default_namespaceoptions. - Use “”” for multi-line quotes, or anything including escaped characters
- Use only
- In Reader
- URI canonicalization and validation.
- Added
:canonicalize, and:internoptions. - Added
#prefixesmethod returning a hash of prefix definitions. - Change
:strictoption to:validate. - Add check to ensure that predicates are not literals, It’s not legal in any RDF variant.
- RSpec 2 compatibility
-
- RDF.rb 0.3.0 compatibility updates
- Remove literal_normalization and qname_hacks, add back uri_hacks (until 0.3.0)
- Use
nilfor default namespace
- In Writer
- Use only
:prefixesfor creating QNames. - Add
:standard_prefixesand:default_namespaceoptions. - Improve
Writer#to_qname. - Don’t try to translate
rdf:_1tordf:lidue to complex corner cases. - Fix problems with
XMLLiteral,rdf:typeandrdf:nodeIDserialization.
- Use only
- In Reader
- URI canonicalization and validation.
- Added
:canonicalize, and:internoptions. - Change
:strictoption to:validate. - Don’t create unnecessary namespaces.
- Don’t use regexp to substitute base URI in URI serialization.
- Collect prefixes when extracting mappings.
Literal::XML- Add all in-scope namespaces, not just those that seem to be used.
- RSpec 2 compatibility
- RDF.rb 0.3.0 compatibility updates
-
- RDF.rb 0.3.0 compatibility updates
- Remove literal_normalization and qname_hacks, add back uri_hacks (until 0.3.0)
- Use nil for default namespace
- In Writer
- Use only
:prefixesfor creating QNames. - Add
:standard_prefixesand:default_namespaceoptions. - Improve
Writer#to_qname.
- Use only
- In Reader
- URI canonicalization and validation.
- Added
:canonicalize, and:internoptions. - Change
:strictoption to:validate. - Don’t create unnecessary namespaces.
- Don’t use regexp to substitute base URI in URI serialization.
- Collect prefixes when extracting mappings.
Literal::XML- Add all in-scope namespaces, not just those that seem to be used.
- RSpec 2 compatibility
- RDF.rb 0.3.0 compatibility updates