-
Notifications
You must be signed in to change notification settings - Fork 0
/
groupmn.4xt
40 lines (38 loc) · 1.24 KB
/
groupmn.4xt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE xtpipes SYSTEM "xtpipes.dtd" >
<xtpipes preamble="yes" signature="empty.4xt">
<sax content-handler="xtpipes.util.ScriptsManager, tex4ht.GroupMn"
lexical-handler="xtpipes.util.ScriptsManagerLH" >
<script element="mn-group" >
<dom name="." xml="." method="mnGroup" class="tex4ht.HtJsml" />
<set name="merge" >
<![CDATA[<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration = "yes" />
<xsl:template match="mn-group" >
<xsl:choose>
<xsl:when test=" not(child::mn) ">
<xsl:apply-templates select="*|text()" />
</xsl:when>
<xsl:otherwise>
<mn>
<xsl:value-of select="." />
</mn>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="*|@*|text()|comment()" >
<xsl:copy>
<xsl:apply-templates select="*|@*|text()|comment()" />
</xsl:copy>
</xsl:template>
<!--This template removes all <u> and continues processing -->
<xsl:template match="mn-group-s">
<xsl:apply-templates select="@*|node()"/>
</xsl:template>
</xsl:stylesheet>
]]>
</set>
<xslt name="." xml="." xsl="merge" />
</script>
</sax>
</xtpipes>