Skip to content
Snippets Groups Projects
Commit f23c565f authored by Martin de la Iglesia's avatar Martin de la Iglesia
Browse files

Wikidata-URL-Schema aktualisiert

parent 9bfd2c3d
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@ Transformationsdauer via VPN ca. 45 Minuten! -->
<xsl:choose>
<xsl:when test="tei:idno[@type = 'URI'][contains(., 'wikidata.org')]">
<xsl:variable name="uri" select="tei:idno[@type = 'URI'][contains(., 'wikidata.org')]"/>
<xsl:variable name="wdurl" select="concat($uri,'.rdf')"/>
<xsl:variable name="wdurl" select="concat('https://www.wikidata.org/wiki/Special:EntityData/Q',substring-after($uri,'/Q'),'.rdf')"/>
<xsl:if test="doc-available($wdurl)">
<xsl:variable name="lat" select="substring-before(substring-after(substring-after(document($wdurl)//ps:P625[not(preceding::ps:P625)],'Point('), ' '),')')"/>
<xsl:variable name="long" select="substring-before(substring-after(document($wdurl)//ps:P625[not(preceding::ps:P625)],'Point('), ' ')"/>
......@@ -50,18 +50,16 @@ Transformationsdauer via VPN ca. 45 Minuten! -->
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="wdurl" select="concat(document($rdfurl)//owl:sameAs[contains(./@rdf:resource, 'wikidata')]/@rdf:resource,'.rdf')"/>
<xsl:if test="doc-available($wdurl)">
<xsl:variable name="lat" select="substring-before(substring-after(substring-after(document($wdurl)//ps:P625[not(preceding::ps:P625)],'Point('), ' '),')')"/>
<xsl:variable name="long" select="substring-before(substring-after(document($wdurl)//ps:P625[not(preceding::ps:P625)],'Point('), ' ')"/>
<xsl:if test="($lat ne '') and ($long ne '')">
<xsl:call-template name="output_wrk">
<xsl:with-param name="placeid" select="@xml:id"/>
<xsl:with-param name="uri" select="substring-before($wdurl,'.rdf')"/>
<xsl:with-param name="lat" select="$lat"/>
<xsl:with-param name="long" select="$long"/>
</xsl:call-template>
</xsl:if>
<xsl:variable name="wdurl" select="concat('https://www.wikidata.org/wiki/Special:EntityData/Q',substring-after(document($rdfurl)//owl:sameAs[contains(./@rdf:resource, 'wikidata')]/@rdf:resource,'/Q'),'.rdf')"/>
<xsl:variable name="lat" select="substring-before(substring-after(substring-after(document($wdurl)//ps:P625[not(preceding::ps:P625)],'Point('), ' '),')')"/>
<xsl:variable name="long" select="substring-before(substring-after(document($wdurl)//ps:P625[not(preceding::ps:P625)],'Point('), ' ')"/>
<xsl:if test="($lat ne '') and ($long ne '')">
<xsl:call-template name="output_wrk">
<xsl:with-param name="placeid" select="@xml:id"/>
<xsl:with-param name="uri" select="substring-before($wdurl,'.rdf')"/>
<xsl:with-param name="lat" select="$lat"/>
<xsl:with-param name="long" select="$long"/>
</xsl:call-template>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
......@@ -117,7 +115,7 @@ Transformationsdauer via VPN ca. 45 Minuten! -->
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="wdurl" select="concat(document($rdfurl)//owl:sameAs[contains(./@rdf:resource, 'wikidata')]/@rdf:resource,'.rdf')"/>
<xsl:variable name="wdurl" select="concat('https://www.wikidata.org/wiki/Special:EntityData/Q',substring-after(document($rdfurl)//owl:sameAs[contains(./@rdf:resource, 'wikidata')]/@rdf:resource,'/Q'),'.rdf')"/>
<xsl:if test="doc-available($wdurl)">
<xsl:variable name="lat" select="substring-before(substring-after(substring-after(document($wdurl)//ps:P625[not(preceding::ps:P625)],'Point('), ' '),')')"/>
<xsl:variable name="long" select="substring-before(substring-after(document($wdurl)//ps:P625[not(preceding::ps:P625)],'Point('), ' ')"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment