Skip to content

Commit

Permalink
sts2mn adoc xslt updated, fixed issue with 'modified' text, #129
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelligent2013 committed Mar 27, 2022
1 parent c7f044e commit 013589c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/resources/sts2mn.common.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -465,11 +465,11 @@

<xsl:template name="build_sts_model_term_source">
<xsl:apply-templates />
<xsl:variable name="isModified" select="contains(normalize-space(.), ' modified')"/>
<xsl:variable name="isModified" select="contains(normalize-space(.), ' modified') or .//node()[starts-with(., 'modified')]"/>
<xsl:if test="$isModified = 'true'">
<modified>
<xsl:text>,</xsl:text>
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(substring-after(normalize-space(.), ' modified')), '^(\s|\h)*(-|–|—)?(\s|\h)*','')"/>
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(substring-after(normalize-space(.), 'modified')), '^(\s|\h)*(-|–|—)?(\s|\h)*','')"/> <!-- ' modified' -->
</modified>
</xsl:if>
<xsl:variable name="isAdapted" select="contains(normalize-space(.), $adapted_from_text)"/>
Expand All @@ -484,7 +484,7 @@
<xsl:variable name="isFirstText" select="not(preceding-sibling::node())"/>

<!-- <xsl:variable name="modified_text">, modified</xsl:variable> -->
<xsl:variable name="modified_text_regex">^(.*),? modified(.*)$</xsl:variable>
<xsl:variable name="modified_text_regex">^(.*),?(\s|\h)?modified(.*)$</xsl:variable>

<!-- remove 'Adapted from:' or 'Adapted from' text -->
<xsl:variable name="text_">
Expand Down

0 comments on commit 013589c

Please sign in to comment.