Bugzilla – Attachment 127455 Details for
Bug 27627
Fix invalid HTML in OPAC results XSLT: change spans to divs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27627: Fix invalid HTMl in OPAC results XSLT: change spans to divs
Bug-27627-Fix-invalid-HTMl-in-OPAC-results-XSLT-ch.patch (text/plain), 7.18 KB, created by
Owen Leonard
on 2021-11-08 15:54:52 UTC
(
hide
)
Description:
Bug 27627: Fix invalid HTMl in OPAC results XSLT: change spans to divs
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-11-08 15:54:52 UTC
Size:
7.18 KB
patch
obsolete
>From 90db8accff3c031e16a84ece94d9c4823a4b5245 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 4 Feb 2021 16:14:48 +0000 >Subject: [PATCH] Bug 27627: Fix invalid HTMl in OPAC results XSLT: change > spans to divs > >This patch modifies the XSL template for OPAC search results in order to >improve HTML validation: Changing some <span>s to <div>s will prevent an >error when those <span>s contain block-level elements. > >To test, apply the patch and restart_all if necessary. > >- Confirm that OPACXSLTResultsDisplay is set to "default" >- Perform a catalog search in the OPAC. >- Validate the page source and confirm that there are no errors about > "Element ul not allowed as child of element span in this context" >--- > .../en/xslt/MARC21slim2OPACResults.xsl | 44 +++++++++---------- > 1 file changed, 22 insertions(+), 22 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index 6c48a46daa..fdfc4ef218 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >@@ -472,7 +472,7 @@ > </xsl:choose> > </xsl:variable> > >- <span class="results_summary"><a> >+ <div class="results_summary"><a> > <xsl:attribute name="href"> > <xsl:value-of select="$OpenURLResolverURL" /> > </xsl:attribute> >@@ -499,7 +499,7 @@ > <xsl:value-of select="$openurltext" /> > </xsl:otherwise> > </xsl:choose> >- </a></span> >+ </a></div> > </xsl:if> > <!-- End of OpenURL --> > >@@ -650,29 +650,29 @@ > </xsl:call-template> > > <xsl:if test="marc:datafield[@tag=250]"> >- <span class="results_summary edition"> >+ <div class="results_summary edition"> > <span class="label">Edition: </span> > <xsl:for-each select="marc:datafield[@tag=250]"> > <xsl:call-template name="subfieldSelect"> > <xsl:with-param name="codes">ab</xsl:with-param> > </xsl:call-template> > </xsl:for-each> >- </span> >+ </div> > </xsl:if> > > <xsl:if test="marc:datafield[@tag=773]"> > <xsl:for-each select="marc:datafield[@tag=773]"> > <xsl:if test="marc:subfield[@code='t']"> >- <span class="results_summary source"> >+ <div class="results_summary source"> > <span class="label">Source: </span> > <xsl:value-of select="marc:subfield[@code='t']"/> >- </span> >+ </div> > </xsl:if> > </xsl:for-each> > </xsl:if> > > <xsl:if test="$DisplayOPACiconsXSLT!='0'"> >- <span class="results_summary type"> >+ <div class="results_summary type"> > <xsl:if test="$typeOf008!=''"> > <span class="results_material_type"> > <span class="label">Material type: </span> >@@ -1033,7 +1033,7 @@ > </span> > </xsl:if> > <xsl:text> </xsl:text> <!-- added blank space to fix font display problem, see Bug 3671 --> >- </span> >+</div> > </xsl:if> > > <xsl:call-template name="show-lang-041"/> >@@ -1050,7 +1050,7 @@ > > <!-- Publisher or Distributor Number --> > <xsl:if test="marc:datafield[@tag=028]"> >- <span class="results_summary publisher_number "> >+ <div class="results_summary publisher_number "> > <span class="label">Publisher number: </span> > <ul class="resource_list"> > <xsl:for-each select="marc:datafield[@tag=028]"> >@@ -1061,7 +1061,7 @@ > </li> > </xsl:for-each> > </ul> >- </span> >+ </div> > </xsl:if> > > <!-- Publisher info and RDA related info from tags 260, 264 --> >@@ -1070,7 +1070,7 @@ > <xsl:call-template name="showRDAtag264"/> > </xsl:when> > <xsl:when test="marc:datafield[@tag=260]"> >- <span class="results_summary publisher"><span class="label">Publication details: </span> >+ <div class="results_summary publisher"><span class="label">Publication details: </span> > <xsl:for-each select="marc:datafield[@tag=260]"> > <xsl:if test="marc:subfield[@code='a']"> > <span class="publisher_place" property="location"> >@@ -1103,13 +1103,13 @@ > <xsl:text>; </xsl:text> > <xsl:call-template name="showRDAtag264"/> > </xsl:if> >- </span> >+ </div> > </xsl:when> > </xsl:choose> > > <!-- Dissertation note --> > <xsl:if test="marc:datafield[@tag=502]"> >- <span class="results_summary diss_note"> >+ <div class="results_summary diss_note"> > <span class="label">Dissertation note: </span> > <xsl:for-each select="marc:datafield[@tag=502]"> > <xsl:call-template name="subfieldSelect"> >@@ -1117,7 +1117,7 @@ > </xsl:call-template> > </xsl:for-each> > <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose> >- </span> >+ </div> > </xsl:if> > > <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) --> >@@ -1131,7 +1131,7 @@ > </xsl:if> > > <xsl:if test="marc:datafield[@tag=246]"> >- <span class="results_summary other_title"> >+ <div class="results_summary other_title"> > <span class="label">Other title: </span> > <ul class="resource_list"> > <xsl:for-each select="marc:datafield[@tag=246]"> >@@ -1142,10 +1142,10 @@ > </li> > </xsl:for-each> > </ul> >- </span> >+ </div> > </xsl:if> > <xsl:if test="marc:datafield[@tag=242]"> >- <span class="results_summary translated_title"> >+ <div class="results_summary translated_title"> > <span class="label">Title translated: </span> > <xsl:for-each select="marc:datafield[@tag=242]"> > <xsl:call-template name="subfieldSelect"> >@@ -1153,10 +1153,10 @@ > </xsl:call-template> > <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> > </xsl:for-each> >- </span> >+ </div> > </xsl:if> > <xsl:if test="marc:datafield[@tag=856]"> >- <span class="results_summary online_resources"> >+ <div class="results_summary online_resources"> > <span class="label">Online access: </span> > <ul class="resource_list"> > <xsl:for-each select="marc:datafield[@tag=856]"> >@@ -1248,11 +1248,11 @@ > </xsl:if> > </xsl:for-each> > </ul> >- </span> >+ </div> > </xsl:if> > > <!-- Availability line --> >- <span class="results_summary availability"> >+ <div class="results_summary availability"> > <span class="label">Availability: </span> > > <xsl:choose> >@@ -1394,7 +1394,7 @@ > > </xsl:otherwise> > </xsl:choose> >- </span> >+ </div> > <!-- End of Availability line --> > > </xsl:template> >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27627
:
116330
|
116332
|
116334
|
116438
|
127455
|
127544
|
130976