@@ -243,9 +243,7 @@ has last_etag => ( is => 'rw', isa => Str, predicate => 'has_last_etag');
243243=item namespaces ( $namespace_map )
244244
245245Gets or sets the namespaces that some serializers use for
246- pretty-printing. Should be handed a L<URI::NamespaceMap> object. RDF,
247- VoID, Hydra, DC Terms and XML Schema are added by the module and do
248- not need to be declared.
246+ pretty-printing. Should be handed a L<URI::NamespaceMap> object.
249247
250248=cut
251249
@@ -255,16 +253,14 @@ has 'namespaces' => (is => 'rw',
255253 lazy => 1,
256254 handles => {
257255 ' add_namespace_mapping' => ' add_mapping' ,
256+ ' guess_namespaces' => ' guess_and_add' ,
258257 ' list_namespaces' => ' list_namespaces'
259258 });
260259
261260
262261sub _build_namespaces {
263262 my $self = shift ;
264- my $nsmap = shift || URI::NamespaceMap-> new();
265- $nsmap -> guess_and_add(' rdf' , ' void' , ' dct' , ' xsd' );
266- $nsmap -> add_mapping(hydra => ' http://www.w3.org/ns/hydra/core#' );
267- return $nsmap ;
263+ return shift || URI::NamespaceMap-> new();
268264}
269265
270266# Just a temporary compatibility hack
@@ -352,6 +348,7 @@ sub response {
352348 $output_model -> add_statement($st );
353349 }
354350 my $cl = literal($counter , undef , ' http://www.w3.org/2001/XMLSchema#integer' );
351+ $self -> guess_namespaces(' void' );
355352 my $void = $self -> namespaces-> void;
356353 $output_model -> add_statement(statement(iri($uri ),
357354 iri($void -> triples),
@@ -715,7 +712,6 @@ sub _void_content {
715712 }
716713
717714 if ($self -> has_fragments) {
718- $self -> add_namespace_mapping(hydra => ' http://www.w3.org/ns/hydra/core#' );
719715 $self -> _common_fragments_control($self -> _voidmodel);
720716 }
721717
0 commit comments