Skip to content

Commit

Permalink
Fix XSLT for appearance table after https switch
Browse files Browse the repository at this point in the history
See JMRI/website#329 for background
  • Loading branch information
mattharris committed Sep 20, 2019
1 parent 29af901 commit 21d872b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions xml/XSLT/appearancetable.xsl
Expand Up @@ -51,13 +51,13 @@

<html>
<head>
<title>JMRI &quot;<xsl:value-of select="document('http:aspects.xml', .)/aspecttable/name"/>
<title>JMRI &quot;<xsl:value-of select="document('aspects.xml', .)/aspecttable/name"/>
<xsl:text>: </xsl:text>
<xsl:value-of select="appearancetable/name"/>&quot; Appearance Table</title>
</head>

<body>
<h2>JMRI &quot;<xsl:value-of select="document('http:aspects.xml', .)/aspecttable/name"/>
<h2>JMRI &quot;<xsl:value-of select="document('aspects.xml', .)/aspecttable/name"/>
<xsl:text>: </xsl:text>
<xsl:value-of select="appearancetable/name"/>&quot; Appearance Table</h2>

Expand All @@ -83,7 +83,7 @@ This page was produced by <a href="http://jmri.org">JMRI</a>.
<a href="aspects.xml">
<!-- The second argument provides the context (parent file) for the document() path; -->
<!-- without it, the reference is relative to the stylesheet location -->
<xsl:value-of select="document('http:aspects.xml', .)/aspecttable/name"/>
<xsl:value-of select="document('aspects.xml', .)/aspecttable/name"/>
</a>
<p/>
Name: <xsl:value-of select="name"/><p/>
Expand Down Expand Up @@ -116,7 +116,7 @@ This page was produced by <a href="http://jmri.org">JMRI</a>.
<!-- Compare to each aspect name in aspects.xml for matching rule -->
<!-- The second argument provides the context (parent file) for the document() path; -->
<!-- without it, the reference is relative to the stylesheet location -->
<xsl:for-each select="document('http:aspects.xml', .)/aspecttable/aspects/aspect[name=$matchaspect]">
<xsl:for-each select="document('aspects.xml', .)/aspecttable/aspects/aspect[name=$matchaspect]">
<!-- looking at all aspects to find the one matching matchaspect -->
<!-- now current node is match in aspects.xml -->

Expand All @@ -139,15 +139,15 @@ This page was produced by <a href="http://jmri.org">JMRI</a>.
<!-- end heading -->

<!-- error if no match -->
<xsl:if test="not(document('http:aspects.xml', .)/aspecttable/aspects/aspect[name=$matchaspect])">
<xsl:if test="not(document('aspects.xml', .)/aspecttable/aspects/aspect[name=$matchaspect])">
<em>Error: This appearance does not appear in the <a href="aspects.xml">aspect table</a>.
Check spelling and upper/lower case.</em>
</xsl:if>

<!-- then compare to each aspect name in aspects.xml for match -->
<!-- The second argument provides the context (parent file) for the document() path; -->
<!-- without it, the reference is relative to the stylesheet location -->
<xsl:for-each select="document('http:aspects.xml', .)/aspecttable/aspects/aspect[name=$matchaspect]">
<xsl:for-each select="document('aspects.xml', .)/aspecttable/aspects/aspect[name=$matchaspect]">
<!-- now current node is match in aspects.xml -->

<!-- show title element if it exists -->
Expand Down

0 comments on commit 21d872b

Please sign in to comment.