RDF-Trine
view release on metacpan or search on metacpan
Changes.ttl view on Meta::CPAN
asc:update "Fixed bug in RDF::Trine::Iterator::SAXHandler on data with empty results." ;
asc:update "Fixed canonicalization bug in RDF::Trine::Node::Literal for xsd:decimals with no decimal point." ;
asc:update "Fixed RDF::Trine::Node::Resource->qname handling of unicode IRIs." ;
asc:update "Fixed RDF::Trine::Parser::NTriples->parse_file to accept filenames just like the superclass implementation." ;
asc:update "Fixed RDF::Trine::Parser->parse_file to open files as utf8." ;
asc:update "Fixed RDF::Trine::Parser->parse_url_into_model to pass through 'canonicalize' argument to actual parser method call." ;
asc:update "Allow 'canonicalize' argument to RDF::Trine::Iterator->from_json method." ;
asc:update "Made diagnostic messages less noisy in t/store-hexastore-storable.t." ;
asc:update "Silenced an uninitialized warning in RDF::Trine::Parser::NTriples." ;
asc:update "Removed use of XML::SAX in RDF::Trine::Serializer subclasses." ;
asc:update "Added turtle parser test for file with BOM." ;
asc:update "Updated RDF::Trine::Store::DBI and RDF::Trine::Store::DBI::mysql to use DBI placeholders." ;
] .
<http://kasei.us/code/files/RDF-Trine-0.133.tar.gz>
dcterms:isVersionOf <http://kasei.us/code/rdf-trine/#project> ;
dcterms:replaces <http://kasei.us/code/files/RDF-Trine-0.132.tar.gz> ;
doap:Version [
doap:revision "0.133" ;
doap:created "2011-02-07" ;
];
asc:changes [
asc:addition "Added RDF::Trine::NamespaceMap class." ;
asc:addition "Added support to populate RDF::Trine::NamespaceMap objects during RDF parsing." ;
asc:addition "Added RDF::Trine::Model get_list and add_list methods for managing rdf:List structures." ;
asc:addition "Added support for parsing SPARQL JSON Results format in RDF::Trine::Iterator->from_json." ;
asc:addition "RDF::Trine::Parser subclasses now allow parse_file_into_model and parse_file being called as class methods." ;
asc:addition "Added 'restrict' and 'extend' options to RDF::Trine::Serializer->negotiate to allow more control over content negotiation." ;
asc:addition "Added the ability to restrict the nodes returned from the RDF::Trine::Model->objects method by node type or by literal language/datatype." ;
asc:update "Fixed bug in Turtle parser that wouldn't allow a Unicode BOM in the input." ;
asc:update "Fixed bug in turtle serialization of blank nodes used in graph cycles (reported by tobyink)." ;
asc:update "Fixed bug in RDF::Trine::Serializer::RDFXML that wasn't escaping XML entities in IRIs and bnode labels (github issue 3 from nichtich)." ;
asc:update "Updated RDF::Trine::Store::Hexastore to use equal() method instead of op<==> for testing node equality." ;
asc:update "Updated t/parser-rdfjson.t to test bnode equality using identifier strings, not with op<==>." ;
asc:update "Updated RDF::Trine::Store::SPARQL to allow bulk-update operations." ;
asc:update "Added string overloading to RDF::Trine::Node subclasses." ;
asc:update "Updated conneg code setting default q-values in RDF::Trine::Serializer." ;
asc:update "Updated RDF::Trine::Iterator::Graph->print_xml to set utf8 binmode on the output filehandle." ;
asc:update "Changed required version of Module::Load::Conditional to 0.38 (based on version in debian)." ;
asc:update "Fixed RDF/XML xmlns serialization bug when used with RDF::Trine::NamespaceMap objects." ;
* ENHANCEMENTS
Fixed RDF::Trine::Node::Resource->qname handling of unicode IRIs.
Fixed RDF::Trine::Parser::NTriples->parse_file to accept filenames just like the superclass implementation.
Fixed RDF::Trine::Parser->parse_file to open files as utf8.
Fixed RDF::Trine::Parser->parse_url_into_model to pass through 'canonicalize' argument to actual parser method call.
Allow 'canonicalize' argument to RDF::Trine::Iterator->from_json method.
* OTHER
Made diagnostic messages less noisy in t/store-hexastore-storable.t.
Silenced an uninitialized warning in RDF::Trine::Parser::NTriples.
Removed use of XML::SAX in RDF::Trine::Serializer subclasses.
Added turtle parser test for file with BOM.
Updated RDF::Trine::Store::DBI and RDF::Trine::Store::DBI::mysql to use DBI placeholders.
Version 0.133 (2011-02-07)
* BUG FIXES
Fixed bug in Turtle parser that wouldn't allow a Unicode BOM in the input.
Fixed bug in turtle serialization of blank nodes used in graph cycles (reported by tobyink).
Fixed bug in RDF::Trine::Serializer::RDFXML that wasn't escaping XML entities in IRIs and bnode labels (github issue 3 from nichtich).
Updated RDF::Trine::Store::Hexastore to use equal() method instead of op<==> for testing node equality.
Updated t/parser-rdfjson.t to test bnode equality using identifier strings, not with op<==>.
Fixed RDF/XML xmlns serialization bug when used with RDF::Trine::NamespaceMap objects.
* NEW FEATURES
Added RDF::Trine::NamespaceMap class.
Added support to populate RDF::Trine::NamespaceMap objects during RDF parsing.
Added RDF::Trine::Model get_list and add_list methods for managing rdf:List structures.
Added support for parsing SPARQL JSON Results format in RDF::Trine::Iterator->from_json.
lib/RDF/Trine/Parser/Turtle/Lexer.pm view on Meta::CPAN
unless (length($self->buffer)) {
my $line = $self->file->getline;
if (defined($line)) {
$self->{buffer} .= $line;
}
}
}
=item C<< check_for_bom >>
Checks the input buffer for a Unicode BOM, and consumes it if it is present.
=cut
sub check_for_bom {
my $self = shift;
my $c = $self->_peek_char();
if (defined($c) and $c eq "\x{FEFF}") {
$self->_get_char;
}
}
t/parser-turtle.t view on Meta::CPAN
my $ok = 0;
RDF::Trine::Parser->parse_file( $base, $file, sub { $ok = 1; } );
ok( $ok, 'parse_file, guessed from filename' );
}
{
my $file = File::Spec->catfile( $Bin, 'data', 'bugs', 'ttl-with-bom.ttl' );
my $model = RDF::Trine::Model->temporary_model;
my $p = RDF::Trine::Parser::Turtle->new();
$p->parse_file_into_model( undef, $file, $model );
is( $model->size, 1, 'expected model size from turtle file with BOM' );
}
foreach my $file (@good) {
my $data = do { open( my $fh, '<', $file ); local($/) = undef; <$fh> };
my (undef, undef, $test) = File::Spec->splitpath( $file );
lives_ok {
my $uri = URI::file->new($file, (($file =~ m#^\w:\\\\#) ? 'win32' : ()));
my $url = $uri->as_string;
my $parser = RDF::Trine::Parser::Turtle->new();
$parser->parse( $url, $data );
( run in 0.498 second using v1.01-cache-2.11-cpan-131fc08a04b )