]> Lady’s Gitweb - LesML/blobdiff - parser.xslt
Add support for proper name marks
[LesML] / parser.xslt
index e726a9e9953b1f744e346f653c0218b679fcd1e3..7f6d153b8c1bd3bb373187ffc2b7ddaeb7ba4846 100644 (file)
@@ -219,7 +219,7 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                                <value-of select="substring-after($first-line, '##')"/>
                        </comment>
                </if>
-               <if test="$shebang!='' or $doclines[normalize-space()!='']">
+               <if test="$doclines[normalize-space()!='']">
                        <variable name="record-separators" select="$doclines[starts-with(., '%%')]"/>
                        <element name="article" namespace="&xhtml;">
                                <for-each select="$params/html:div/html:dt[string()=' LANG ']">
@@ -639,9 +639,11 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                                </with-param>
                        </call-template>
                </variable>
-               <call-template name="LesML:parse">
-                       <with-param name="lines" select="exsl:node-set($lines-fragment)/*"/>
-               </call-template>
+               <element name="div" namespace="&xhtml;">
+                       <call-template name="LesML:parse">
+                               <with-param name="lines" select="exsl:node-set($lines-fragment)/*"/>
+                       </call-template>
+               </element>
        </template>
        <template match="html:blockquote" mode="LesML:finalize-tree">
                <if test="not(preceding-sibling::node()) or preceding-sibling::node()[position()=1 and not(self::html:blockquote)]">
@@ -753,6 +755,7 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                <param name="element-namespace" select="'http://www.w3.org/1999/xhtml'"/>
                <param name="start-sigil"/>
                <param name="end-sigil"/>
+               <param name="class"/>
                <param name="role"/>
                <param name="langtag-supported" select="false()"/>
                <choose>
@@ -800,6 +803,11 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                                                                                        <value-of select="$role"/>
                                                                                </attribute>
                                                                        </if>
+                                                                       <if test="string($class)!=''">
+                                                                               <attribute name="class">
+                                                                                       <value-of select="$class"/>
+                                                                               </attribute>
+                                                                       </if>
                                                                        <if test="string($langtag)!=''">
                                                                                <if test="$element-namespace='http://www.w3.org/1999/xhtml'">
                                                                                        <attribute name="lang">
@@ -1032,6 +1040,18 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                                <with-param name="end-sigil" select="'⟫'"/>
                        </apply-templates>
                </variable>
+               <apply-templates select="exsl:node-set($result)/node()" mode="LesML:named"/>
+       </template>
+       <template match="node()" mode="LesML:named">
+               <variable name="result">
+                       <apply-templates select="." mode="LesML:inline">
+                               <with-param name="element-name" select="'u'"/>
+                               <with-param name="element-namespace" select="'&xhtml;'"/>
+                               <with-param name="start-sigil" select="'⸶'"/>
+                               <with-param name="end-sigil" select="'⸷'"/>
+                               <with-param name="class" select="'name'"/>
+                       </apply-templates>
+               </variable>
                <apply-templates select="exsl:node-set($result)/node()" mode="LesML:offset"/>
        </template>
        <template match="node()" mode="LesML:offset">
This page took 0.072769 seconds and 4 git commands to generate.