Bugzilla – Attachment 20569 Details for
Bug 6594
Add schema.org microdata
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6594: Schema.org span nesting improvements
Bug-6594-Schemaorg-span-nesting-improvements.patch (text/plain), 3.90 KB, created by
Jared Camins-Esakov
on 2013-08-22 15:57:10 UTC
(
hide
)
Description:
Bug 6594: Schema.org span nesting improvements
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2013-08-22 15:57:10 UTC
Size:
3.90 KB
patch
obsolete
>From 0bb50a65784f00d9b47cd31bffc8385c31319216 Mon Sep 17 00:00:00 2001 >From: Dan Scott <dan@coffeecode.net> >Date: Thu, 22 Aug 2013 11:47:12 -0400 >Subject: [PATCH] Bug 6594: Schema.org span nesting improvements > >So, it turns out that the <a href> was causing a new "chain" to be >invoked, thus nesting the <span> elements for properties within the <a >href> actually caused the properties to be attached to that new chain >rather than the containing object. Therefore, wrap the <span> elements >around the <a href> elements where applicable. > >Thanks to Manu Sporny in #rdfa for helping me to sort this out. > >Signed-off-by: Dan Scott <dan@coffeecode.net> >Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> >I tested by validating against the Google rich snippet tool, >validator.nu, and linter.structured-data.org. All were satisfied >with the microdata markup, and the properties that are set make >sense. > >These patches are only for MARC21 XSLT view, but I think it is worth >pushing them even without the NORMARC and UNIMARC markup, so that >people can start to test out schema.org microdata in Koha, and >refine the implementation. >--- > .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 14 ++++++-------- > 1 file changed, 6 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl >index 24c23d8..56e71eb 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl >@@ -336,16 +336,14 @@ > </xsl:if> > <xsl:text> </xsl:text> > <xsl:if test="marc:subfield[@code='b']"> >- <a href="/cgi-bin/koha/opac-search.pl?q=pb:{marc:subfield[@code='b']}"> >- <span property="name"> >+ <span property="name"><a href="/cgi-bin/koha/opac-search.pl?q=pb:{marc:subfield[@code='b']}"> > <xsl:call-template name="subfieldSelect"> > <xsl:with-param name="codes">b</xsl:with-param> > </xsl:call-template> >- </span> >- </a> >- </xsl:if> >+ </a></span> >+ </xsl:if> > </span> >- <xsl:text> </xsl:text> >+ <xsl:text> </xsl:text> > <xsl:if test="marc:subfield[@code='c' or @code='g']"> > <span property="datePublished"> > <xsl:call-template name="chopPunctuation"> >@@ -546,6 +544,7 @@ > <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']"> > <span class="results_summary subjects"><span class="label">Subject(s): </span> > <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']"> >+ <span property="keywords"> > <a> > <xsl:choose> > <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'"> >@@ -564,7 +563,6 @@ > <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="marc:subfield[@code='a']"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute> > </xsl:otherwise> > </xsl:choose> >- <span property="keywords"> > <xsl:call-template name="chopPunctuation"> > <xsl:with-param name="chopString"> > <xsl:call-template name="subfieldSelect"> >@@ -574,8 +572,8 @@ > </xsl:call-template> > </xsl:with-param> > </xsl:call-template> >- </span> > </a> >+ </span> > <xsl:if test="marc:subfield[@code=9]"> > <a class='authlink'> > <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> >-- >1.7.9.5
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 6594
:
20566
|
20567
|
20568
|
20569
|
20697
|
20698
|
20699
|
20700