Skip to content

Commit

Permalink
Correct JSON out put for schema.org #95 and correct behaviour of man…
Browse files Browse the repository at this point in the history
…aged directories not to ask for role where inappropriate
  • Loading branch information
ByronCinNZ committed May 4, 2023
1 parent 062bacf commit b6d599c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
select="$map[@key = $type]/@value"/>

<xsl:variable name="prefixedBy"
select="if ($prefix = '') then 'http://schema.org/' else $prefix"/>
select="if ($prefix = '') then '' else $prefix"/>

<xsl:value-of select="if ($match != '')
then concat($prefixedBy, $match)
Expand Down Expand Up @@ -169,10 +169,10 @@
<xsl:variable name="hierarchyLevels"
select="distinct-values(mdb:metadataScope/*/mdb:resourceScope/*/@codeListValue[. != ''])"/>
<xsl:for-each select="$hierarchyLevels">
"@type": "<xsl:value-of select="schema-org-fn:getType(., 'schema:')"/>",
"@type": "<xsl:value-of select="schema-org-fn:getType(., '')"/>",
</xsl:for-each>
<xsl:if test="count($hierarchyLevels) = 0">
"@type": "schema:Dataset",
"@type": "Dataset",
</xsl:if>
<!-- TODO: Use the identifier property to attach any relevant Digital Object identifiers (DOIs). -->
"@id": "<xsl:value-of select="concat($baseUrl, 'api/records/', mdb:metadataIdentifier[1]/*/mcc:code/*/text())"/>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@

<for name="mdb:contact" addDirective="data-gn-directory-entry-selector">
<directiveAttributes
data-template-add-action="false"
data-template-add-action="true"
data-search-action="true"
data-popup-action="true"
data-template-type="contact"
Expand All @@ -118,7 +118,7 @@
</for>
<for name="mri:pointOfContact" addDirective="data-gn-directory-entry-selector">
<directiveAttributes
data-template-add-action="false"
data-template-add-action="true"
data-template-type="contact"
data-search-action="true"
data-popup-action="true"
Expand Down Expand Up @@ -153,7 +153,7 @@
</for>
<for name="cit:citedResponsibleParty" addDirective="data-gn-directory-entry-selector">
<directiveAttributes
data-template-add-action="false"
data-template-add-action="true"
data-template-type="contact"
data-search-action="true"
data-popup-action="true"
Expand Down

0 comments on commit b6d599c

Please sign in to comment.