Skip to content

Commit

Permalink
Merge pull request #189 from OP-TED/epo-release-changes
Browse files Browse the repository at this point in the history
changes to metadata generation
  • Loading branch information
Dragos0000 authored Oct 26, 2023
2 parents 332f4e6 + 8edc7a7 commit 65dddeb
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 29 deletions.
16 changes: 8 additions & 8 deletions src/owl-core.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:vann="http://purl.org/vocab/vann/"
xmlns:cc="http://creativecommons.org/ns#"
exclude-result-prefixes="xs math xd xsl uml xmi umldi fn f"
exclude-result-prefixes="xs math xd xsl uml xmi umldi fn f bibo"
version="3.0">


Expand Down Expand Up @@ -82,17 +81,18 @@
<rdfs:seeAlso rdf:resource="{.}"/>
</xsl:for-each>
<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date"><xsl:value-of select="$issuedDate"/></dct:issued>
<dct:created rdf:datatype="http://www.w3.org/2001/XMLSchema#date"><xsl:value-of select="$createdDate"/></dct:created>
<owl:versionInfo><xsl:value-of select="$versionInfo"/></owl:versionInfo>
<owl:incompatibleWith><xsl:value-of select="$incompatibleWith"/></owl:incompatibleWith>
<owl:versionIRI rdf:resource="{fn:concat($coreArtefactURI,'-',$versionInfo)}"/>
<bibo:status><xsl:value-of select="$ontologyStatus"/></bibo:status>
<owl:priorVersion><xsl:value-of select="$priorVersion"/></owl:priorVersion>
<!-- <bibo:status><xsl:value-of select="$ontologyStatus"/></bibo:status>-->

<owl:priorVersion><xsl:value-of select="fn:concat($coreArtefactURI,'-',$priorVersion)"/></owl:priorVersion>

<vann:preferredNamespaceUri><xsl:value-of select="$preferredNamespaceUri"/></vann:preferredNamespaceUri>
<vann:preferredNamespacePrefix><xsl:value-of select="$preferredNamespacePrefix"/></vann:preferredNamespacePrefix>
<dct:rights><xsl:value-of select="$rightsLiteral"/></dct:rights>
<dct:license rdf:resource="{$licenseURI}"/>
<cc:attributionName><xsl:value-of select="$attributionNameLiteral"/></cc:attributionName>
<cc:attributionURL rdf:resource="{$attributionURL}"/>
<dct:license><xsl:value-of select="$licenseLiteral"/></dct:license>

</owl:Ontology>

</xsl:template>
Expand Down
13 changes: 5 additions & 8 deletions src/owl-restrictions.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:vann="http://purl.org/vocab/vann/"
xmlns:cc="http://creativecommons.org/ns#"
exclude-result-prefixes="xs math xd xsl uml xmi umldi fn f"
exclude-result-prefixes="xs math xd xsl uml xmi umldi fn f bibo"
version="3.0">
<xd:doc scope="stylesheet">
<xd:desc>
Expand Down Expand Up @@ -79,17 +78,15 @@
</xsl:for-each>

<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date"><xsl:value-of select="$issuedDate"/></dct:issued>
<dct:created rdf:datatype="http://www.w3.org/2001/XMLSchema#date"><xsl:value-of select="$createdDate"/></dct:created>
<owl:versionInfo><xsl:value-of select="$versionInfo"/></owl:versionInfo>
<owl:incompatibleWith><xsl:value-of select="$incompatibleWith"/></owl:incompatibleWith>
<owl:versionIRI rdf:resource="{fn:concat($restrictionsArtefactURI,'-',$versionInfo)}"/>
<bibo:status><xsl:value-of select="$ontologyStatus"/></bibo:status>
<owl:priorVersion><xsl:value-of select="$priorVersion"/></owl:priorVersion>
<!-- <bibo:status><xsl:value-of select="$ontologyStatus"/></bibo:status>-->
<owl:priorVersion><xsl:value-of select="fn:concat($restrictionsArtefactURI,'-',$priorVersion)"/></owl:priorVersion>
<vann:preferredNamespaceUri><xsl:value-of select="$preferredNamespaceUri"/></vann:preferredNamespaceUri>
<vann:preferredNamespacePrefix><xsl:value-of select="$preferredNamespacePrefix"/></vann:preferredNamespacePrefix>
<dct:rights><xsl:value-of select="$rightsLiteral"/></dct:rights>
<dct:license rdf:resource="{$licenseURI}"/>
<cc:attributionName><xsl:value-of select="$attributionNameLiteral"/></cc:attributionName>
<cc:attributionURL rdf:resource="{$attributionURL}"/>
<dct:license><xsl:value-of select="$licenseLiteral"/></dct:license>

</owl:Ontology>
</xsl:template>
Expand Down
14 changes: 5 additions & 9 deletions src/shacl-shapes.xsl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:math="http://www.w3.org/2005/xpath-functions/math"
Expand All @@ -19,8 +18,7 @@
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:vann="http://purl.org/vocab/vann/"
xmlns:cc="http://creativecommons.org/ns#"
exclude-result-prefixes="xs math xd xsl uml xmi umldi fn f"
exclude-result-prefixes="xs math xd xsl uml xmi umldi fn f bibo"
version="3.0">

<xd:doc scope="stylesheet">
Expand Down Expand Up @@ -87,17 +85,15 @@
<rdfs:seeAlso rdf:resource="{.}"/>
</xsl:for-each>
<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date"><xsl:value-of select="$issuedDate"/></dct:issued>
<dct:created rdf:datatype="http://www.w3.org/2001/XMLSchema#date"><xsl:value-of select="$createdDate"/></dct:created>
<owl:versionInfo><xsl:value-of select="$versionInfo"/></owl:versionInfo>
<owl:incompatibleWith><xsl:value-of select="$incompatibleWith"/></owl:incompatibleWith>
<owl:versionIRI rdf:resource="{fn:concat($shapeArtefactURI,'-',$versionInfo)}"/>
<bibo:status><xsl:value-of select="$ontologyStatus"/></bibo:status>
<owl:priorVersion><xsl:value-of select="$priorVersion"/></owl:priorVersion>
<!-- <bibo:status><xsl:value-of select="$ontologyStatus"/></bibo:status>-->
<owl:priorVersion><xsl:value-of select="fn:concat($shapeArtefactURI,'-',$priorVersion)"/></owl:priorVersion>
<vann:preferredNamespaceUri><xsl:value-of select="$preferredNamespaceUri"/></vann:preferredNamespaceUri>
<vann:preferredNamespacePrefix><xsl:value-of select="$preferredNamespacePrefix"/></vann:preferredNamespacePrefix>
<dct:rights><xsl:value-of select="$rightsLiteral"/></dct:rights>
<dct:license rdf:resource="{$licenseURI}"/>
<cc:attributionName><xsl:value-of select="$attributionNameLiteral"/></cc:attributionName>
<cc:attributionURL rdf:resource="{$attributionURL}"/>
<dct:license><xsl:value-of select="$licenseLiteral"/></dct:license>

</owl:Ontology>
</xsl:template>
Expand Down
8 changes: 4 additions & 4 deletions test/ePO-default-config/config-parameters.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@
'https://docs.ted.europa.eu/EPO/latest/index.html')"/>
<!-- dct:issued-->
<xsl:variable name="issuedDate" select="format-date(current-date(), '[Y0001]-[M01]-[D01]')"/>
<!-- dct:created-->
<xsl:variable name="createdDate" select="format-date(current-date(), '[Y0001]-[M01]-[D01]')"/>
<!-- owl:incompatibleWith -->
<xsl:variable name="incompatibleWith" select="'2.1.0'"/>
<!-- owl:versionInfo -->
Expand All @@ -140,13 +142,11 @@
<xsl:variable name="preferredNamespacePrefix" select="'epo'"/>


<xsl:variable name="rightsLiteral" select="'The Commission’s reuse policy is implemented by Commission Decision2011/833/EU of 12 December 2011 on the reuse of Commission documents
<xsl:variable name="licenseLiteral" select="'The Commission’s reuse policy is implemented by Commission Decision2011/833/EU of 12 December 2011 on the reuse of Commission documents
(OJ L 330,14.12.2011, p. 39 – https://eur-lex.europa.eu/eli/dec/2011/833/oj). Unlessotherwise noted, the reuse of this document is authorised under the
CreativeCommons Attribution 4.0 International (CC BY 4.0) licence (https://creativecommons.org/licenses/by/4.0/).This means that reuse is allowed, provided
that appropriate credit is given and any changes are indicated.'"/>
<xsl:variable name="licenseURI" select="'http://creativecommons.org/licenses/by-sa/4.0'"/>
<xsl:variable name="attributionNameLiteral" select="'European Union'"/>
<xsl:variable name="attributionURL" select="'http://publications.europa.eu/resource/authority/corporate-body/EURUN'"/>

<!-- dct:publisher-->
<xsl:variable name="publisher" select="'http://publications.europa.eu/resource/authority/corporate-body/PUBL'"/>

Expand Down

0 comments on commit 65dddeb

Please sign in to comment.