Skip to content

Commit

Permalink
Merge branch 'release/9.1' into LT-21742
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-sil authored Jun 3, 2024
2 parents df51003 + 52006ce commit 6e1f3cb
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,14 @@ Main template
</xsl:if>
</xsl:for-each>
</languages>
<types> </types>
<types>
<type id="tDependent" color="#0000FF"/>
<type id="tGramInfo" color="#FF9900"/>
<type id="tMoved" color="#FF0000"/>
<type id="tMovedMkr" color="#FF8080"/>
<type id="tSong" color="#993366"/>
<type id="tSpeech" color="#008000"/>
</types>
</lingPaper>
</xsl:template>
<!--
Expand Down Expand Up @@ -122,7 +129,10 @@ Main template
-->
<xsl:template match="listRef">
<gloss lang="{@lang}">
<xsl:apply-templates/>
<xsl:text>&#x20;</xsl:text>
<object type="tGramInfo">
<xsl:apply-templates/>
</object>
</gloss>
</xsl:template>
<!--
Expand All @@ -132,7 +142,38 @@ Main template
<xsl:if test="@noSpaceBefore='false'">
<xsl:text>&#x20;</xsl:text>
</xsl:if>
<xsl:apply-templates/>
<xsl:choose>
<xsl:when test="ancestor::row[@type='speech']">
<object type="tSpeech">
<xsl:apply-templates/>
</object>
</xsl:when>
<xsl:when test="ancestor::row[@type='song']">
<object type="tSong">
<xsl:apply-templates/>
</object>
</xsl:when>
<xsl:when test="ancestor::row[@type='dependent']">
<object type="tDependent">
<xsl:apply-templates/>
</object>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="@noSpaceAfter='false'">
<xsl:text>&#x20;</xsl:text>
</xsl:if>
</xsl:template>

<xsl:template match="lit[following-sibling::*[1][name()='listRef'] or preceding-sibling::*[1][name()='listRef']]">
<xsl:if test="@noSpaceBefore='false' or preceding-sibling::*[1][name()='word']">
<xsl:text>&#x20;</xsl:text>
</xsl:if>
<object type="tGramInfo">
<xsl:apply-templates/>
</object>
<xsl:if test="@noSpaceAfter='false'">
<xsl:text>&#x20;</xsl:text>
</xsl:if>
Expand All @@ -143,7 +184,26 @@ Main template
<xsl:if test="count(preceding-sibling::*) &gt; 0">
<xsl:text>&#x20;</xsl:text>
</xsl:if>
<xsl:apply-templates/>
<xsl:choose>
<xsl:when test="ancestor::row[@type='speech']">
<object type="tSpeech">
<xsl:apply-templates/>
</object>
</xsl:when>
<xsl:when test="ancestor::row[@type='song']">
<object type="tSong">
<xsl:apply-templates/>
</object>
</xsl:when>
<xsl:when test="ancestor::row[@type='dependent']">
<object type="tDependent">
<xsl:apply-templates/>
</object>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</langData>
</xsl:template>

Expand All @@ -162,7 +222,7 @@ Main template
<lineGroup>
<line>
<wrd>
<xsl:apply-templates select="lit | word | listRef"/>
<xsl:apply-templates select="lit | word | listRef | moveMkr"/>
</wrd>
</line>
<line>
Expand All @@ -178,6 +238,21 @@ Main template
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!--
moveMkr
-->
<xsl:template match="moveMkr">
<object type="tMovedMkr">
<xsl:choose>
<xsl:when test=".='Preposed'">
<xsl:text>&lt;&lt; </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> &gt;&gt;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</object>
</xsl:template>
<!--
row
-->
Expand Down Expand Up @@ -207,7 +282,31 @@ Main template
<xsl:if test="count(preceding-sibling::*) &gt; 0">
<xsl:text>&#x20;</xsl:text>
</xsl:if>
<xsl:apply-templates/>
<xsl:choose>
<xsl:when test="ancestor::row[@type='speech']">
<object type="tSpeech">
<xsl:apply-templates/>
</object>
</xsl:when>
<xsl:when test="ancestor::row[@type='song']">
<object type="tSong">
<xsl:apply-templates/>
</object>
</xsl:when>
<xsl:when test="ancestor::row[@type='dependent']">
<object type="tDependent">
<xsl:apply-templates/>
</object>
</xsl:when>
<xsl:when test="@moved='true'">
<object type="tMoved">
<xsl:apply-templates/>
</object>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</langData>
</xsl:template>
</xsl:stylesheet>
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<FxtDocumentDescription dataLabel="XLingPaper" formatLabel="XML" defaultExtension="xml" filter="XML files (*.xml)|*.xml|All files (*.*)|*.*" mode="applySingleTransform" transform="Discourse2XLingPaper.xsl">
<p>Export the discourse chart to a basic XLingPaper document which can then be used to cut and paste into another XLingPaper document. XLingPaper is a way to write linguistic papers using XML technologies. </p>
<p>Some of us like using the freely available XMLmind XML Editor with the XLingPaper configuration files for XMLmind to do this editing. See
<a href="https://software.sil.org/xlingpaper/">https://software.sil.org/xlingpaper/</a></p>
<p>Export the discourse chart to a basic XLingPaper document which can then be used to cut and paste into another XLingPaper document.</p>
<p>XLingPaper is a way to write linguistic papers using XML technologies. Some of us like using the freely available XMLmind XML Editor with the XLingPaper configuration files for XMLmind to do this editing. See <a href="http://software.sil.org/xlingpaper/">http://software.sil.org/xlingpaper/</a>.</p>
</FxtDocumentDescription>

0 comments on commit 6e1f3cb

Please sign in to comment.