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

zusätzliche doc-available-Tests

parent 3ac566fe
No related branches found
No related tags found
No related merge requests found
......@@ -22,16 +22,18 @@ Transformationsdauer via VPN ca. 45 Minuten! -->
<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="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="$uri"/>
<xsl:with-param name="lat" select="$lat"/>
<xsl:with-param name="long" select="$long"/>
</xsl:call-template>
</xsl:if>
<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="$uri"/>
<xsl:with-param name="lat" select="$lat"/>
<xsl:with-param name="long" select="$long"/>
</xsl:call-template>
</xsl:if>
</xsl:if>
</xsl:when>
<xsl:when test="tei:idno[@type = 'URI'][contains(., 'd-nb.info')]">
<xsl:variable name="uri" select="tei:idno[@type = 'URI'][contains(., 'd-nb.info')][not(preceding-sibling::tei:idno[@type = 'URI'][contains(., 'd-nb.info')])]"/>
......@@ -85,16 +87,18 @@ Transformationsdauer via VPN ca. 45 Minuten! -->
<xsl:when test="tei:idno[@type = 'URI'][contains(., 'vocab.getty.edu/tgn')]">
<xsl:variable name="uri" select="tei:idno[@type = 'URI'][contains(., 'vocab.getty.edu/tgn')][not(preceding-sibling::tei:idno[@type = 'URI'][contains(., 'vocab.getty.edu/tgn')])]"/>
<xsl:variable name="rdfurl" select="concat($uri,'.rdf')"/>
<xsl:variable name="lat" select="document($rdfurl)//wgs:lat"/>
<xsl:variable name="long" select="document($rdfurl)//wgs:long"/>
<xsl:if test="($lat ne '') and ($long ne '')">
<xsl:call-template name="output">
<xsl:with-param name="placeid" select="@xml:id"/>
<xsl:with-param name="uri" select="$uri"/>
<xsl:with-param name="lat" select="$lat"/>
<xsl:with-param name="long" select="$long"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="doc-available($rdfurl)">
<xsl:variable name="lat" select="document($rdfurl)//wgs:lat"/>
<xsl:variable name="long" select="document($rdfurl)//wgs:long"/>
<xsl:if test="($lat ne '') and ($long ne '')">
<xsl:call-template name="output">
<xsl:with-param name="placeid" select="@xml:id"/>
<xsl:with-param name="uri" select="$uri"/>
<xsl:with-param name="lat" select="$lat"/>
<xsl:with-param name="long" select="$long"/>
</xsl:call-template>
</xsl:if>
</xsl:if>
</xsl:when>
<xsl:when test="tei:idno[@type = 'URI'][contains(., 'd-nb.info')]">
<xsl:variable name="uri" select="tei:idno[@type = 'URI'][contains(., 'd-nb.info')][not(preceding-sibling::tei:idno[@type = 'URI'][contains(., 'd-nb.info')])]"/>
......@@ -112,16 +116,18 @@ Transformationsdauer via VPN ca. 45 Minuten! -->
</xsl:when>
<xsl:otherwise>
<xsl:variable name="wdurl" select="concat(document($rdfurl)//owl:sameAs[contains(./@rdf:resource, 'wikidata')]/@rdf:resource,'.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">
<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 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">
<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:if>
</xsl:otherwise>
</xsl:choose>
......
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