- identify_missing_authorities.xslt
Liste les zones des notices bibliographiques faisant référence à des notices
d’autorité absentes du fichier MARCXML.
+
+ - fix_marcxml.xslt
+ Corrige les erreurs connues des fichiers MARCXML exportés de la base de
+ données de BAnQ pour qu’ils soient valides au regard du schéma officiel.
- merge_marcxml.xslt
Fusionner deux fichiers au format MARCXML en supprimant les entrées
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <!-- fix_marcxml.xslt - Fix files from BAnQ so it becomes valid according to
+ MARCXML conformance checker.
+ Copyright (C) 2025 Pierre Choffet
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of version 3 of the GNU General Public License as
+ published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ -->
+
+ <xsl:output indent="yes" method="xml" encoding="utf-8" />
+
+ <xsl:template match="node()|@*">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*" />
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="@ind1">
+ <xsl:choose>
+ <xsl:when test=". = '@'">
+ <xsl:attribute name="ind1">
+ <xsl:text> </xsl:text>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="." />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+</xsl:stylesheet>