Skip to content

Commit

Permalink
Fix for #81.
Browse files Browse the repository at this point in the history
Also attempting to improve error reporting for broken links.
  • Loading branch information
hcayless committed Nov 15, 2021
1 parent f758c90 commit 2ef04a6
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions pn-xslt/MakeHTML.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@
<xsl:when test="doc-available(pi:get-filename(., 'xml'))">
<xsl:apply-templates select="doc(pi:get-filename(., 'xml'))/t:TEI" mode="metadata"/>
</xsl:when>
<xsl:otherwise><xsl:message>Error: <xsl:value-of select="pi:get-filename(., 'xml')"/> not available. Error in <xsl:value-of select="$doc-id"/>.</xsl:message></xsl:otherwise>
<xsl:otherwise><xsl:message>Error: <xsl:value-of select="."/> (<xsl:value-of select="pi:get-filename(., 'xml')"/>) not available. Error in <xsl:value-of select="$doc-id"/>.</xsl:message></xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<xsl:for-each select="$relations[contains(.,'trismegistos.org')]">
Expand All @@ -320,7 +320,7 @@
<xsl:when test="doc-available(pi:get-filename(., 'xml'))">
<xsl:apply-templates select="doc(pi:get-filename(., 'xml'))/t:TEI" mode="metadata"/>
</xsl:when>
<xsl:otherwise><xsl:message>Error: <xsl:value-of select="pi:get-filename(., 'xml')"/> not available. Error in <xsl:value-of select="$doc-id"/>.</xsl:message></xsl:otherwise>
<xsl:otherwise><xsl:message>Error: <xsl:value-of select="."/> (<xsl:value-of select="pi:get-filename(., 'xml')"/>) not available. Error in <xsl:value-of select="$doc-id"/>.</xsl:message></xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<xsl:for-each select="$relations[contains(., 'dclp/')]">
Expand All @@ -329,7 +329,7 @@
<xsl:when test="doc-available(pi:get-filename(., 'xml'))">
<xsl:apply-templates select="doc(pi:get-filename(., 'xml'))/t:TEI" mode="metadata"/>
</xsl:when>
<xsl:otherwise><xsl:message>Error: <xsl:value-of select="pi:get-filename(., 'xml')"/> not available. Error in <xsl:value-of select="$doc-id"/>.</xsl:message></xsl:otherwise>
<xsl:otherwise><xsl:message>Error: <xsl:value-of select="."/> (<xsl:value-of select="pi:get-filename(., 'xml')"/>) not available. Error in <xsl:value-of select="$doc-id"/>.</xsl:message></xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<xsl:call-template name="biblio"/>
Expand Down Expand Up @@ -393,7 +393,7 @@
<xsl:for-each select="$relations[contains(., '/apis/')]">
<xsl:choose>
<xsl:when test="doc-available(pi:get-filename(., 'xml'))"><xsl:apply-templates select="doc(pi:get-filename(., 'xml'))/t:TEI" mode="apistrans"/></xsl:when>
<xsl:otherwise><xsl:message>Error: <xsl:value-of select="pi:get-filename(., 'xml')"/> not available. Error in <xsl:value-of select="$doc-id"/>.</xsl:message></xsl:otherwise>
<xsl:otherwise><xsl:message>Error: <xsl:value-of select="."/> (<xsl:value-of select="pi:get-filename(., 'xml')"/>) not available. Error in <xsl:value-of select="$doc-id"/>.</xsl:message></xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:if>
Expand Down Expand Up @@ -462,7 +462,7 @@
<xsl:when test="doc-available(pi:get-filename(., 'xml'))">
<xsl:apply-templates select="doc(pi:get-filename(., 'xml'))/t:TEI" mode="metadata"/>
</xsl:when>
<xsl:otherwise><xsl:message>Error: <xsl:value-of select="pi:get-filename(., 'xml')"/> not available. Error in <xsl:value-of select="$doc-id"/>.</xsl:message></xsl:otherwise>
<xsl:otherwise><xsl:message>Error: <xsl:value-of select="."/> (<xsl:value-of select="pi:get-filename(., 'xml')"/>) not available. Error in <xsl:value-of select="$doc-id"/>.</xsl:message></xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:if>
Expand All @@ -475,7 +475,7 @@
<xsl:when test="doc-available(pi:get-filename(., 'xml'))">
<xsl:apply-templates select="doc(pi:get-filename(., 'xml'))/t:TEI" mode="apistrans"/>
</xsl:when>
<xsl:otherwise><xsl:message>Error: <xsl:value-of select="pi:get-filename(., 'xml')"/> not available. Error in <xsl:value-of select="$doc-id"/>.</xsl:message></xsl:otherwise>
<xsl:otherwise><xsl:message>Error: <xsl:value-of select="."/> (<xsl:value-of select="pi:get-filename(., 'xml')"/>) not available. Error in <xsl:value-of select="$doc-id"/>.</xsl:message></xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</div>
Expand Down Expand Up @@ -567,7 +567,10 @@
<h2>DDbDP transcription: <xsl:value-of select="t:teiHeader/t:fileDesc/t:publicationStmt/t:idno[@type='filename']"/> [<a href="/ddbdp/{t:teiHeader/t:fileDesc/t:publicationStmt/t:idno[@type='ddb-hybrid']}/source">xml</a>]</h2></xsl:otherwise></xsl:choose>
<xsl:variable name="text">
<xsl:choose>
<xsl:when test="$type = 'DCLP'"><xsl:apply-templates select=".//t:div[@type='edition']"/></xsl:when>
<xsl:when test="$type = 'DCLP'">
<xsl:apply-templates select=".//t:body/t:head"/>
<xsl:apply-templates select=".//t:div[@type='edition']"/>
</xsl:when>
<xsl:otherwise><xsl:apply-templates select=".//t:body"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
Expand Down

0 comments on commit 2ef04a6

Please sign in to comment.