[Koha-bugs] [Bug 13642] Adding new features for Dublin Core metadata

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Feb 26 16:26:28 CET 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13642

--- Comment #46 from Héctor Eduardo Castro Avalos <hector.hecaxmmx at gmail.com> ---
Hi Jonathan

(In reply to Jonathan Druart from comment #42)
> (In reply to Marc Véron from comment #41)
> > Created attachment 36154 [details] [review] [review]
> > [Signed-off]Bug 13642 - Adding new features for Dublin Core metadata
> > 
> > When Koha export a bibliographic record to DC, makes it in XML format. This
> > XML is not well-formed document and do not follows the DC-XML
> > recommendations as should be.
> 
> How can I know if the xml is not well-formed?
> I tested on http://validator.w3.org/check and got:
>   This document was successfully checked as well-formed XML!
>   Result: 	Passed, 2 warning(s)

This is because you're not validating against the specified XSD schema. Use
this one <http://www.freeformatter.com/xml-validator-xsd.html>

The old Dublin Core (XML) file is in uppercase eg. dc:Date, dc:Creator, and if
you compare with the recommendation
<http://dublincore.org/documents/dc-xml-guidelines/> at section 4.2 cite
"Recommendation 4. The property names for the 15 DC elements should be all
lower-case." eg. dc:date, dc:creator.

Also, this file use an improper xsi:schemaLocation:
xsi:schemaLocation="http://example.org/myapp/
http://example.org/myapp/schema.xsd"
This XML schema does not exist. And is explained in is Section "4.3 Example - a
simple DC record". The file generated with this patch deal with both.

The DC-XML file generate a not-valid file if you don't have a proper XSD
schema. But if you donwload an OAI-DC this has one.

> 
> > XML::Entities not found in .deb package
> 
> Maybe XML::LibXML can do the trick?

XML::LibXML uses the library libxml. This library only uses the five basic
entities (&lt, &gt, &quot, &amp, and &apos), if you want more entities, you
need to declare them in a DTD Doctype file.

Record.pm in C4/ use sub _entity_encode with Unicode::Normalize (NFC function)
in a foreache with a regexp for marcxml files, but got the problem of mix the
five basics entities with hexadecimal entities. (eg. &gt &xFFFF)

RDF::Helper use the same five basic entities.

DublinCoreTransformer.pm in Koha/ is coded to use the entities or not.

If you think that this is a problem I can change the code to eliminate
XML::Entities and use the solution of C4::Record sub _entity_encode.

> 
> > New patch for work with librdf-helper-perl (2.0) and librdf-trine-perl
> > (1.000).
> > RDF::Trine and RDF::Helper not need to be upgraded. Tested in both (upgraded
> > and not upgraded)
> 
> I don't have librdf-helper-perl
>   E: Unable to locate package librdf-helper-perl

I didn't know about isn't on Jessie Debian. I can try to fix this only using
RDF::Trine this module still on Jessie
<https://packages.debian.org/jessie/librdf-trine-perl>

Please, let me know what you think about my comment, and I will start to doing
the changes.

Regards

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list