Skip to content

Commit

Permalink
epidoc/schema/8.23 for DCLPText
Browse files Browse the repository at this point in the history
  • Loading branch information
Elemmire committed Aug 31, 2017
1 parent 6f8ffb1 commit 738085a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/dclp_text_identifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def before_commit(content)
DCLPTextIdentifier.preprocess(content)
end

# Applies the preprocess XSLT to 'content' (uses same preprocess.xsl as DCLP Meta)
# Applies the preprocess XSLT to 'content'
# - *Args* :
# - +content+ -> XML as string
# - *Returns* :
Expand All @@ -99,7 +99,7 @@ def self.preprocess(content)
JRubyXML.apply_xsl_transform(
JRubyXML.stream_from_string(content),
JRubyXML.stream_from_file(File.join(Rails.root,
%w{data xslt metadata preprocess.xsl})))
%w{data xslt ddb preprocess.xsl})))
end

# ?
Expand Down
9 changes: 9 additions & 0 deletions data/xslt/ddb/preprocess.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,18 @@

<!-- set xml-model processing instruction, converting previous oxygen processing instructions -->
<xsl:template match="processing-instruction('oxygen')|processing-instruction('xml-model')">
<xsl:choose>
<xsl:when test="/tei:TEI//tei:idno[@type='dclp']">
<xsl:processing-instruction name="xml-model"><xsl:text>href="http://www.stoa.org/epidoc/schema/8.23/tei-epidoc.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"</xsl:text></xsl:processing-instruction>
<xsl:text>
</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:processing-instruction name="xml-model"><xsl:text>href="http://www.stoa.org/epidoc/schema/8.16/tei-epidoc.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"</xsl:text></xsl:processing-instruction>
<xsl:text>
</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<!-- always generate handNotes from content -->
Expand Down

0 comments on commit 738085a

Please sign in to comment.