Skip to content

Commit

Permalink
Merge pull request #151 from CDRH/pb
Browse files Browse the repository at this point in the history
Pb
  • Loading branch information
karindalziel authored Sep 17, 2019
2 parents d46ac68 + 897bd6e commit 4cc7911
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ then from the collection:
gem install --local path/to/local/datura/pkg/datura-0.1.2.gem
```

Note: You may need to delete your `scripts/.xslt-datura` folder as well.

## First Steps

Test it out by running the `about` command to view all your options (`bundle exec` may not be necessary, but it is recommended):
Expand Down
2 changes: 1 addition & 1 deletion lib/datura/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Datura
VERSION = "0.1.3"
VERSION = "0.1.4"
end
11 changes: 5 additions & 6 deletions lib/xslt/tei_to_html/lib/cdrh.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,13 @@
<xsl:text>/0/default.jpg</xsl:text>
</xsl:template>

<xsl:template match="pb">
<!-- grab the figure id, first looking in @facs, then @xml:id, and if there is a .jpg, chop it off -->
<xsl:template match="pb">
<!-- grab the figure id from @facs, and if there is a .jpg, chop it off
note: I previously also looked at xml:id for figure ID, but that's
incorrect -->
<xsl:variable name="figure_id">
<xsl:variable name="figure_id_full">
<xsl:choose>
<xsl:when test="@facs"><xsl:value-of select="@facs"></xsl:value-of></xsl:when>
<xsl:when test="@xml:id"><xsl:value-of select="@xml:id"></xsl:value-of></xsl:when>
</xsl:choose>
<xsl:value-of select="normalize-space(@facs)"></xsl:value-of>
</xsl:variable>
<xsl:choose>
<xsl:when test="ends-with($figure_id_full,'.jpg') or ends-with($figure_id_full,'.jpeg')">
Expand Down

0 comments on commit 4cc7911

Please sign in to comment.