Bug 16608 - Missing entity nbsp in some XML files
authorFridolin Somers <fridolin.somers@biblibre.com>
Fri, 27 May 2016 08:50:00 +0000 (10:50 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 10 Jun 2016 17:40:55 +0000 (17:40 +0000)
The special character "non breaking space" &nbsp; is not contained in XML syntax by default.
So we add it in the file header :
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>

Even if the source code files do no contain this character, it can be that translated files contain it.
French for example "Titre&nbsp;:".

This entity is missing in all files in koha-tmpl/intranet-tmpl/prog/en/data/ and in some files of koha-tmpl/intranet-tmpl/prog/en/xslt.

Test plan :
  - generate French templates:
    cd misc/translator
    ./translate install fr-FR
    cd ../..
  - run test:
    prove -v t/00-valid-xml.t
    you get failing error message
  - apply this patch
  - translate again
  - run test again: it passes

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described following test plan
Tes pass, no errors.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_006.xml
koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_008.xml
koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_CF.xsd
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MADS.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslimUtils.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetResults.xsl

index cfd16e8..ae0a641 100644 (file)
@@ -1,4 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <Tagfield tag="006" xmlns="http://koha-community.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="./marc21_field_CF.xsd">
   <Material id="BKS"><name>Books</name><description></description>
     <Position pos="00"><name>Form of material</name><description></description>
index 32055a7..eb62dd5 100644 (file)
@@ -1,4 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <Tagfield tag="008" xmlns="http://koha-community.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="./marc21_field_CF.xsd">
   <Material id="BKS"><name>Books</name><description></description>
     <Position pos="00-05"><name>Date entered on file</name><description>Computer-generated, six-character numeric string that indicates the date the MARC record was created. Recorded in the pattern yymmdd.</description></Position>
index 3398ba8..be91f27 100644 (file)
@@ -1,4 +1,7 @@
 <?xml version="1.0"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <xs:schema xmlns="http://koha-community.org" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://koha-community.org" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1">
   <xs:annotation>
     <xs:documentation>Control field plugin type of materials schema</xs:documentation>
index 15aa17a..8af36c9 100644 (file)
@@ -1,4 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <xsl:stylesheet version="1.0" xmlns:mads="http://www.loc.gov/mads/v2"
     xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:marc="http://www.loc.gov/MARC21/slim"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
index d692ef6..bf4af4b 100644 (file)
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <xsl:stylesheet version="1.0"
   xmlns:marc="http://www.loc.gov/MARC21/slim"
   xmlns:items="http://www.koha-community.org/items"
index 293f4cf..7d1400a 100644 (file)
@@ -1,4 +1,7 @@
 <?xml version='1.0'?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:template name="datafield">
                <xsl:param name="tag"/>
index fcc4510..3e30890 100644 (file)
@@ -1,4 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
 <xsl:stylesheet version="1.0"
   xmlns:marc="http://www.loc.gov/MARC21/slim"