[Koha-patches] [PATCH] Improve OAI Server MARC21 and UNIMARC XSL

Frédéric Demians f.demians at tamil.fr
Fri Sep 18 11:07:35 CEST 2009


Dublin Core schema name space was repeated for each field
as attribute rather than at <oai_dc:dc> level. This reduces
significantly the size of OAI server responses.
---
 .../prog/en/xslt/MARC21slim2OAIDC.xsl              |    6 +++++-
 .../prog/en/xslt/UNIMARCslim2OAIDC.xsl             |    6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2OAIDC.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2OAIDC.xsl
index 9a3ecb1..60975e0 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2OAIDC.xsl
+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2OAIDC.xsl
@@ -16,7 +16,11 @@
 			</oai_dc:dcCollection>
 		</xsl:if>
 		<xsl:if test="marc:record">
-			<oai_dc:dc xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
+          <oai_dc:dc
+            xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
+            xmlns:dc="http://purl.org/dc/elements/1.1/"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+            xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
 				<xsl:apply-templates/>
 			</oai_dc:dc>
 		</xsl:if>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl
index a1f2bcf..27c78ed 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl
+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl
@@ -20,7 +20,11 @@
 			</oai_dc:dcCollection>
 		</xsl:if>
 		<xsl:if test="marc:record">
-			<oai_dc:dc xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
+          <oai_dc:dc
+            xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
+            xmlns:dc="http://purl.org/dc/elements/1.1/"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+            xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
 				<xsl:apply-templates/>
 			</oai_dc:dc>
 		</xsl:if>
-- 
1.6.4.3




More information about the Koha-patches mailing list