<!ENTITY section-break "*-.=_~·․‥…⁂⋯─━┄┅┈┉╌╍═╴╶╸╺☙❧ ・*-.=_~">
<!ENTITY sigiled-text "(string-length($text)=1 or substring($text, 2, 1)=' ')">
<!ENTITY unsigiled-text "substring($text, 3, string-length($text)-2)">
+ <!ENTITY xhtml "http://www.w3.org/1999/xhtml">
]>
<transform
xmlns="http://www.w3.org/1999/XSL/Transform"
xmlns:LesML="urn:fdc:ladys.computer:20240512:LesML"
xmlns:exsl="http://exslt.org/common"
+ xmlns:exslset="http://exslt.org/sets"
xmlns:exslstr="http://exslt.org/strings"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:书社="urn:fdc:ladys.computer:20231231:Shu1She4"
<with-param name="source" select="string()"/>
</call-template>
<if test="position()!=count($broken)">
- <element name="html:br"/>
+ <element name="br" namespace="&xhtml;"/>
</if>
</for-each>
</template>
<variable name="params" select="exsl:node-set($params-fragment)/*"/>
<variable name="noshebang" select="$lines[position()>1 or not(starts-with(., '#!lesml') or starts-with(., '##'))]"/>
<variable name="docsep" select="$noshebang[starts-with(., '#!lesml') or starts-with(., '##')][1]"/>
- <variable name="doclines" select="$noshebang[not($docsep) or following-sibling::*[generate-id()=generate-id($docsep)]]"/>
+ <variable name="doclines" select="exslset:leading($noshebang, $docsep)"/>
<if test="starts-with($first-line, '##') and $first-line!='##'">
<comment>
<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="html:article">
+ <element name="article" namespace="&xhtml;">
<for-each select="$params/html:div/html:dt[string()=' LANG ']">
<attribute name="lang">
<value-of select="following-sibling::html:dd"/>
</attribute>
</for-each>
<if test="$record-separators[preceding-sibling::*[normalize-space()!='']]">
- <element name="html:footer">
+ <element name="footer" namespace="&xhtml;">
<attribute name="class">
<text>head</text>
</attribute>
<for-each select="$record-separators">
<variable name="position" select="position()"/>
<variable name="prev-separator" select="$record-separators[($position)-1]"/>
- <variable name="fields" select="$noshebang[following-sibling::*[generate-id()=generate-id(current())] and (not($prev-separator) or preceding-sibling::*[generate-id()=generate-id($prev-separator)])]"/>
+ <variable name="fields" select="exslset:leading(exslset:trailing($doclines, $prev-separator), .)"/>
<if test="$fields">
- <element name="html:dl">
+ <element name="dl" namespace="&xhtml;">
<for-each select="$fields">
<choose>
- <when test="starts-with(., ' ') and $fields[generate-id()=generate-id(current()/preceding-sibling::*[1])]"/>
+ <when test="starts-with(., ' ') and exslset:leading($fields, .)"/>
<otherwise>
- <variable name="next" select="following-sibling::*[not(starts-with(., ' '))]"/>
- <element name="html:div">
- <element name="html:dt">
+ <variable name="next" select="exslset:intersection(following-sibling::*[not(starts-with(., ' '))][1], $fields)"/>
+ <element name="div" namespace="&xhtml;">
+ <element name="dt" namespace="&xhtml;">
<value-of select="normalize-space(substring-before(., ':'))"/>
</element>
- <element name="html:dd">
+ <element name="dd" namespace="&xhtml;">
<variable name="firstline">
<choose>
<when test="contains(., ':')">
<value-of select="$firstline"/>
</otherwise>
</choose>
- <for-each select="following-sibling::*[starts-with(., ' ') and not(preceding-sibling::*[generate-id()=generate-id($next)])]">
+ <for-each select="exslset:intersection(following-sibling::*[starts-with(., ' ')], exslset:leading($fields, $next))">
<variable name="nextline" select="normalize-space(.)"/>
<choose>
<when test="substring($nextline, string-length($nextline))='\' and following-sibling::*[position()=1 and starts-with(., ' ')]">
</for-each>
</element>
</if>
- <element name="html:div">
+ <element name="div" namespace="&xhtml;">
<attribute name="class">
<text>body</text>
</attribute>
<call-template name="LesML:paragraphize">
- <with-param name="lines" select="$doclines[not($record-separators) or preceding-sibling::*[generate-id()=generate-id($record-separators[last()])]]"/>
+ <with-param name="lines" select="exslset:trailing($doclines, $record-separators[last()])"/>
</call-template>
</element>
</element>
</if>
<if test="$docsep">
<call-template name="LesML:parse">
- <with-param name="lines" select="$docsep|$lines[preceding-sibling::*[generate-id()=generate-id($docsep)]]"/>
+ <with-param name="lines" select="$docsep|exslset:trailing($lines, $docsep)"/>
<with-param name="parent-params" select="$params"/>
</call-template>
</if>
<for-each select="$last-lines">
<variable name="position" select="position()"/>
<variable name="prev-last" select="$last-lines[($position)-1]"/>
- <variable name="linespans" select="$lines[following-sibling::*[generate-id()=generate-id(current())] and (not($prev-last) or preceding-sibling::*[generate-id()=generate-id($prev-last)]) and normalize-space()!='']|."/>
+ <variable name="linespans" select="(exslset:intersection(exslset:trailing($lines, $prev-last), exslset:leading($lines, .))|.)[normalize-space()!='']"/>
<variable name="quoted" select="not($linespans[not(starts-with(., ' ') or starts-with(., '	'))])"/>
<variable name="preformatted" select="not($linespans[not(starts-with(normalize-space(), '|'))])"/>
<variable name="text">
<variable name="par">
<choose>
<when test="$preformatted">
- <element name="html:pre">
+ <element name="pre" namespace="&xhtml;">
<call-template name="LesML:id-and-contents">
<with-param name="source" select="$text"/>
</call-template>
</element>
</when>
<when test="starts-with($text, '⁌') and &sigiled-text;">
- <element name="html:h1">
+ <element name="h1" namespace="&xhtml;">
<call-template name="LesML:id-and-contents">
<with-param name="source" select="&unsigiled-text;"/>
</call-template>
</element>
</when>
<when test="starts-with($text, '§') and &sigiled-text;">
- <element name="html:h2">
+ <element name="h2" namespace="&xhtml;">
<call-template name="LesML:id-and-contents">
<with-param name="source" select="&unsigiled-text;"/>
</call-template>
</element>
</when>
<when test="starts-with($text, '❦') and &sigiled-text;">
- <element name="html:h3">
+ <element name="h3" namespace="&xhtml;">
<call-template name="LesML:id-and-contents">
<with-param name="source" select="&unsigiled-text;"/>
</call-template>
</element>
</when>
<when test="starts-with($text, '✠') and &sigiled-text;">
- <element name="html:h4">
+ <element name="h4" namespace="&xhtml;">
<call-template name="LesML:id-and-contents">
<with-param name="source" select="&unsigiled-text;"/>
</call-template>
</element>
</when>
<when test="starts-with($text, '•') and &sigiled-text;">
- <element name="html:li">
+ <element name="li" namespace="&xhtml;">
<attribute name="class">
<text>unordered</text>
</attribute>
<attribute name="data-level">
<text>1</text>
</attribute>
- <element name="html:p">
+ <element name="p" namespace="&xhtml;">
<call-template name="LesML:id-and-contents">
<with-param name="source" select="&unsigiled-text;"/>
</call-template>
</element>
</when>
<when test="starts-with($text, '🔢') and &sigiled-text;">
- <element name="html:li">
+ <element name="li" namespace="&xhtml;">
<attribute name="class">
<text>ordered</text>
</attribute>
<attribute name="data-level">
<text>1</text>
</attribute>
- <element name="html:p">
+ <element name="p" namespace="&xhtml;">
<call-template name="LesML:id-and-contents">
<with-param name="source" select="&unsigiled-text;"/>
</call-template>
</element>
</when>
<when test="starts-with($text, '◦') and &sigiled-text;">
- <element name="html:li">
+ <element name="li" namespace="&xhtml;">
<attribute name="class">
<text>unordered</text>
</attribute>
<attribute name="data-level">
<text>2</text>
</attribute>
- <element name="html:p">
+ <element name="p" namespace="&xhtml;">
<call-template name="LesML:id-and-contents">
<with-param name="source" select="&unsigiled-text;"/>
</call-template>
</element>
</when>
<when test="starts-with($text, '🔠') and &sigiled-text;">
- <element name="html:li">
+ <element name="li" namespace="&xhtml;">
<attribute name="class">
<text>ordered</text>
</attribute>
<attribute name="data-level">
<text>2</text>
</attribute>
- <element name="html:p">
+ <element name="p" namespace="&xhtml;">
<call-template name="LesML:id-and-contents">
<with-param name="source" select="&unsigiled-text;"/>
</call-template>
</element>
</when>
<when test="starts-with($text, '▪') and &sigiled-text;">
- <element name="html:li">
+ <element name="li" namespace="&xhtml;">
<attribute name="class">
<text>unordered</text>
</attribute>
<attribute name="data-level">
<text>3</text>
</attribute>
- <element name="html:p">
+ <element name="p" namespace="&xhtml;">
<call-template name="LesML:id-and-contents">
<with-param name="source" select="&unsigiled-text;"/>
</call-template>
</element>
</when>
<when test="starts-with($text, '🔡') and &sigiled-text;">
- <element name="html:li">
+ <element name="li" namespace="&xhtml;">
<attribute name="class">
<text>ordered</text>
</attribute>
<attribute name="data-level">
<text>3</text>
</attribute>
- <element name="html:p">
+ <element name="p" namespace="&xhtml;">
<call-template name="LesML:id-and-contents">
<with-param name="source" select="&unsigiled-text;"/>
</call-template>
</element>
</when>
<when test="starts-with($text, '⁃') and &sigiled-text;">
- <element name="html:li">
+ <element name="li" namespace="&xhtml;">
<attribute name="class">
<text>unordered</text>
</attribute>
<attribute name="data-level">
<text>4</text>
</attribute>
- <element name="html:p">
+ <element name="p" namespace="&xhtml;">
<call-template name="LesML:id-and-contents">
<with-param name="source" select="&unsigiled-text;"/>
</call-template>
</element>
</when>
<when test="starts-with($text, '🔣') and &sigiled-text;">
- <element name="html:li">
+ <element name="li" namespace="&xhtml;">
<attribute name="class">
<text>ordered</text>
</attribute>
<attribute name="data-level">
<text>4</text>
</attribute>
- <element name="html:p">
+ <element name="p" namespace="&xhtml;">
<call-template name="LesML:id-and-contents">
<with-param name="source" select="&unsigiled-text;"/>
</call-template>
</element>
</when>
<when test="starts-with($text, '🛈') and &sigiled-text;">
- <element name="html:div">
+ <element name="div" namespace="&xhtml;">
<attribute name="role">
<text>note</text>
</attribute>
<attribute name="class">
<text>info</text>
</attribute>
- <element name="html:p">
+ <element name="p" namespace="&xhtml;">
<call-template name="LesML:id-and-contents">
<with-param name="source" select="&unsigiled-text;"/>
</call-template>
</element>
</when>
<when test="starts-with($text, '⯑') and &sigiled-text;">
- <element name="html:div">
+ <element name="div" namespace="&xhtml;">
<attribute name="role">
<text>note</text>
</attribute>
<attribute name="class">
<text>query</text>
</attribute>
- <element name="html:p">
+ <element name="p" namespace="&xhtml;">
<call-template name="LesML:id-and-contents">
<with-param name="source" select="&unsigiled-text;"/>
</call-template>
</element>
</when>
<when test="starts-with($text, '⚠︎') and &sigiled-text;">
- <element name="html:div">
+ <element name="div" namespace="&xhtml;">
<attribute name="role">
<text>note</text>
</attribute>
<attribute name="class">
<text>warn</text>
</attribute>
- <element name="html:p">
+ <element name="p" namespace="&xhtml;">
<call-template name="LesML:id-and-contents">
<with-param name="source" select="&unsigiled-text;"/>
</call-template>
</element>
</when>
<when test="starts-with($text, '※') and &sigiled-text;">
- <element name="html:div">
+ <element name="div" namespace="&xhtml;">
<attribute name="role">
<text>note</text>
</attribute>
<attribute name="class">
<text>note</text>
</attribute>
- <element name="html:p">
+ <element name="p" namespace="&xhtml;">
<call-template name="LesML:id-and-contents">
<with-param name="source" select="&unsigiled-text;"/>
</call-template>
</element>
</when>
<when test="starts-with($text, '☡') and &sigiled-text;">
- <element name="html:div">
+ <element name="div" namespace="&xhtml;">
<attribute name="role">
<text>note</text>
</attribute>
<attribute name="class">
<text>caution</text>
</attribute>
- <element name="html:p">
+ <element name="p" namespace="&xhtml;">
<call-template name="LesML:id-and-contents">
<with-param name="source" select="&unsigiled-text;"/>
</call-template>
</element>
</when>
<when test="starts-with($text, '⋯') and &sigiled-text;">
- <element name="html:div">
+ <element name="div" namespace="&xhtml;">
<attribute name="class">
<text>continuation</text>
</attribute>
- <element name="html:p">
+ <element name="p" namespace="&xhtml;">
<call-template name="LesML:id-and-contents">
<with-param name="source" select="&unsigiled-text;"/>
</call-template>
</comment>
</when>
<otherwise>
- <element name="html:p">
+ <element name="p" namespace="&xhtml;">
<call-template name="LesML:id-and-contents">
<with-param name="source" select="$text"/>
</call-template>
</variable>
<choose>
<when test="translate(string($text), '§ion-break; ', '')=''">
- <element name="html:hr"/>
+ <element name="hr" namespace="&xhtml;"/>
</when>
<when test="$quoted">
- <element name="html:blockquote">
+ <element name="blockquote" namespace="&xhtml;">
<copy-of select="$par"/>
</element>
</when>
</for-each>
</variable>
<variable name="inlined">
- <apply-templates select="exsl:node-set($blocked)/node()" mode="LesML:linkify"/>
+ <apply-templates select="exsl:node-set($blocked)/node()" mode="LesML:comment"/>
</variable>
<apply-templates select="exsl:node-set($inlined)/node()" mode="LesML:finalize-tree"/>
</template>
</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)]">
<variable name="notquote" select="following-sibling::node()[not(self::html:blockquote)][1]"/>
<variable name="contents">
<copy-of select="node()"/>
- <for-each select="following-sibling::node()[not($notquote) or following-sibling::node()[generate-id()=generate-id($notquote)]]">
+ <for-each select="exslset:leading(following-sibling::node(), $notquote)">
<copy-of select="node()"/>
</for-each>
</variable>
<value-of select="substring-after($laststarttext, '— ')"/>
<copy-of select="$laststarttext/following-sibling::node()"/>
</variable>
- <element name="html:figure">
+ <element name="figure" namespace="&xhtml;">
<copy>
<apply-templates select="@*|$content-nodes[position()!=last()]" mode="LesML:finalize-tree"/>
</copy>
- <element name="html:figcaption">
+ <element name="figcaption" namespace="&xhtml;">
<for-each select="$content-nodes[last()]">
<copy>
<apply-templates select="@*|exsl:node-set($caption)/node()" mode="LesML:finalize-tree"/>
<variable name="notcontinuation" select="following-sibling::node()[not(self::html:div and @class='continuation')][1]"/>
<copy>
<apply-templates select="@*|node()" mode="LesML:finalize-tree"/>
- <for-each select="following-sibling::node()[not($notcontinuation) or following-sibling::node()[generate-id()=generate-id($notcontinuation)]]">
+ <for-each select="exslset:leading(following-sibling::node(), $notcontinuation)">
<apply-templates select="node()" mode="LesML:finalize-tree"/>
</for-each>
</copy>
</choose>
</variable>
<variable name="notinlist" select="following-sibling::node()[not(self::html:div and @class='continuation' or self::html:li and (@data-level>$current-level or @data-level=$current-level and @class=$current-class))][1]"/>
- <element name="html:{$wrapper}" namespace="http://www.w3.org/1999/xhtml">
- <for-each select=".|following-sibling::html:li[@data-level=$current-level and (not($notinlist) or following-sibling::node()[generate-id()=generate-id($notinlist)])]">
+ <element name="{$wrapper}" namespace="&xhtml;">
+ <for-each select=".|exslset:leading(following-sibling::node(), $notinlist)[self::html:li and @data-level=$current-level]">
<variable name="notcontinuation" select="following-sibling::node()[not(self::html:div and @class='continuation')][1]"/>
<copy>
<apply-templates select="@*|node()" mode="LesML:finalize-tree"/>
- <for-each select="following-sibling::node()[not($notcontinuation) or following-sibling::node()[generate-id()=generate-id($notcontinuation)]]">
+ <for-each select="exslset:leading(following-sibling::node(), $notcontinuation)">
<apply-templates select="node()" mode="LesML:finalize-tree"/>
</for-each>
<if test="$notcontinuation/self::html:li[@data-level>$current-level]">
<apply-templates select="@*|node()" mode="LesML:finalize-tree"/>
</copy>
</template>
+ <template match="node()" mode="LesML:comment">
+ <variable name="result">
+ <choose>
+ <when test="self::*">
+ <variable name="start-node" select="text()[contains(., '⌦')][1]"/>
+ <variable name="after-start">
+ <if test="$start-node">
+ <value-of select="substring-after($start-node, '⌦')"/>
+ </if>
+ </variable>
+ <variable name="has-end-node" select="contains($after-start, '⌫') or $start-node/following-sibling::text()[contains(., '⌫')]"/>
+ <choose>
+ <when test="$start-node and $has-end-node">
+ <variable name="following">
+ <value-of select="$after-start"/>
+ <copy-of select="$start-node/following-sibling::node()"/>
+ </variable>
+ <variable name="end-node" select="exsl:node-set($following)/text()[contains(., '⌫')][last()]"/>
+ <variable name="comment">
+ <for-each select="$end-node/preceding-sibling::node()">
+ <value-of select="."/>
+ </for-each>
+ <value-of select="substring-before($end-node, '⌫')"/>
+ </variable>
+ <variable name="comment-split-fragment">
+ <call-template name="LesML:split">
+ <with-param name="source" select="string($comment)"/>
+ <with-param name="separator" select="'--'"/>
+ </call-template>
+ </variable>
+ <variable name="rest-fragment">
+ <element name="span" namespace="&xhtml;">
+ <value-of select="substring-after($end-node, '⌫')"/>
+ <copy-of select="$end-node/following-sibling::node()"/>
+ </element>
+ </variable>
+ <variable name="commented-rest-fragment">
+ <apply-templates select="exsl:node-set($rest-fragment)/node()" mode="LesML:comment"/>
+ </variable>
+ <copy>
+ <copy-of select="@*"/>
+ <copy-of select="$start-node/preceding-sibling::node()"/>
+ <copy-of select="substring-before($start-node, '⌦')"/>
+ <comment>
+ <for-each select="exsl:node-set($comment-split-fragment)/*">
+ <if test="string()='' or starts-with(., '‐')">
+ <text>͏</text>
+ </if>
+ <value-of select="."/>
+ <if test="substring(., string-length(.), 1)='‐'">
+ <text>͏</text>
+ </if>
+ <choose>
+ <when test="position()!=last()">
+ <text>-͏-</text>
+ </when>
+ </choose>
+ </for-each>
+ </comment>
+ <copy-of select="exsl:node-set($commented-rest-fragment)/*/node()"/>
+ </copy>
+ </when>
+ <otherwise>
+ <copy>
+ <copy-of select="@*"/>
+ <apply-templates select="node()" mode="LesML:comment"/>
+ </copy>
+ </otherwise>
+ </choose>
+ </when>
+ <when test="self::text()[contains(., '⌧')]">
+ <variable name="split-fragment">
+ <call-template name="LesML:split">
+ <with-param name="source" select="string()"/>
+ <with-param name="separator" select="'⌧'"/>
+ </call-template>
+ </variable>
+ <for-each select="exsl:node-set($split-fragment)/node()">
+ <value-of select="."/>
+ <if test="position()!=last()">
+ <comment>
+ <text>͏</text>
+ </comment>
+ </if>
+ </for-each>
+ </when>
+ <otherwise>
+ <copy-of select="."/>
+ </otherwise>
+ </choose>
+ </variable>
+ <apply-templates select="exsl:node-set($result)/node()" mode="LesML:linkify"/>
+ </template>
<template match="node()" mode="LesML:inline">
<param name="element-name"/>
<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>
<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">
<text>{🔗</text>
</if>
</for-each>
- <element name="html:a">
+ <element name="a" namespace="&xhtml;">
<attribute name="href">
<value-of select="$ltcomponents[last()]"/>
</attribute>
<template match="node()" mode="LesML:strikethrough">
<variable name="result">
<apply-templates select="." mode="LesML:inline">
- <with-param name="element-name" select="'html:s'"/>
+ <with-param name="element-name" select="'s'"/>
+ <with-param name="element-namespace" select="'&xhtml;'"/>
<with-param name="start-sigil" select="'⸠'"/>
<with-param name="end-sigil" select="'⸡'"/>
</apply-templates>
<template match="node()" mode="LesML:underline">
<variable name="result">
<apply-templates select="." mode="LesML:inline">
- <with-param name="element-name" select="'html:u'"/>
+ <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="'⸥'"/>
</apply-templates>
<template match="node()" mode="LesML:noted">
<variable name="result">
<apply-templates select="." mode="LesML:inline">
- <with-param name="element-name" select="'html:small'"/>
+ <with-param name="element-name" select="'small'"/>
+ <with-param name="element-namespace" select="'&xhtml;'"/>
<with-param name="start-sigil" select="'⟦'"/>
<with-param name="end-sigil" select="'⟧'"/>
<with-param name="role" select="'note'"/>
<template match="node()" mode="LesML:parenthetical">
<variable name="result">
<apply-templates select="." mode="LesML:inline">
- <with-param name="element-name" select="'html:small'"/>
+ <with-param name="element-name" select="'small'"/>
+ <with-param name="element-namespace" select="'&xhtml;'"/>
<with-param name="start-sigil" select="'⸨'"/>
<with-param name="end-sigil" select="'⸩'"/>
</apply-templates>
</variable>
- <apply-templates select="exsl:node-set($result)/node()" mode="LesML:important"/>
+ <apply-templates select="exsl:node-set($result)/node()" mode="LesML:code"/>
</template>
- <template match="node()" mode="LesML:important">
+ <template match="node()" mode="LesML:code">
<variable name="result">
<apply-templates select="." mode="LesML:inline">
- <with-param name="element-name" select="'html:strong'"/>
- <with-param name="start-sigil" select="'☞'"/>
- <with-param name="end-sigil" select="'☜'"/>
+ <with-param name="element-name" select="'code'"/>
+ <with-param name="element-namespace" select="'&xhtml;'"/>
+ <with-param name="start-sigil" select="'`'"/>
+ <with-param name="end-sigil" select="'´'"/>
</apply-templates>
</variable>
- <apply-templates select="exsl:node-set($result)/node()" mode="LesML:emphasized"/>
+ <apply-templates select="exsl:node-set($result)/node()" mode="LesML:titled"/>
</template>
- <template match="node()" mode="LesML:emphasized">
+ <template match="node()" mode="LesML:titled">
<variable name="result">
<apply-templates select="." mode="LesML:inline">
- <with-param name="element-name" select="'html:em'"/>
- <with-param name="start-sigil" select="'⹐'"/>
- <with-param name="end-sigil" select="'⹑'"/>
+ <with-param name="element-name" select="'cite'"/>
+ <with-param name="element-namespace" select="'&xhtml;'"/>
+ <with-param name="start-sigil" select="'⟪'"/>
+ <with-param name="end-sigil" select="'⟫'"/>
</apply-templates>
</variable>
- <apply-templates select="exsl:node-set($result)/node()" mode="LesML:titled"/>
+ <apply-templates select="exsl:node-set($result)/node()" mode="LesML:named"/>
</template>
- <template match="node()" mode="LesML:titled">
+ <template match="node()" mode="LesML:named">
<variable name="result">
<apply-templates select="." mode="LesML:inline">
- <with-param name="element-name" select="'html:cite'"/>
- <with-param name="start-sigil" select="'⟪'"/>
- <with-param name="end-sigil" select="'⟫'"/>
+ <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 match="node()" mode="LesML:offset">
<variable name="result">
<apply-templates select="." mode="LesML:inline">
- <with-param name="element-name" select="'html:i'"/>
+ <with-param name="element-name" select="'i'"/>
+ <with-param name="element-namespace" select="'&xhtml;'"/>
<with-param name="start-sigil" select="'⟨'"/>
<with-param name="end-sigil" select="'⟩'"/>
<with-param name="langtag-supported" select="true()"/>
<template match="node()" mode="LesML:bolded">
<variable name="result">
<apply-templates select="." mode="LesML:inline">
- <with-param name="element-name" select="'html:b'"/>
+ <with-param name="element-name" select="'b'"/>
+ <with-param name="element-namespace" select="'&xhtml;'"/>
<with-param name="start-sigil" select="'⦃'"/>
<with-param name="end-sigil" select="'⦄'"/>
</apply-templates>
</variable>
- <apply-templates select="exsl:node-set($result)/node()" mode="LesML:code"/>
+ <apply-templates select="exsl:node-set($result)/node()" mode="LesML:important"/>
</template>
- <template match="node()" mode="LesML:code">
+ <template match="node()" mode="LesML:important">
+ <variable name="result">
+ <apply-templates select="." mode="LesML:inline">
+ <with-param name="element-name" select="'strong'"/>
+ <with-param name="element-namespace" select="'&xhtml;'"/>
+ <with-param name="start-sigil" select="'☞'"/>
+ <with-param name="end-sigil" select="'☜'"/>
+ </apply-templates>
+ </variable>
+ <apply-templates select="exsl:node-set($result)/node()" mode="LesML:emphasized"/>
+ </template>
+ <template match="node()" mode="LesML:emphasized">
<apply-templates select="." mode="LesML:inline">
- <with-param name="element-name" select="'html:code'"/>
- <with-param name="start-sigil" select="'`'"/>
- <with-param name="end-sigil" select="'´'"/>
+ <with-param name="element-name" select="'em'"/>
+ <with-param name="element-namespace" select="'&xhtml;'"/>
+ <with-param name="start-sigil" select="'⹐'"/>
+ <with-param name="end-sigil" select="'⹑'"/>
</apply-templates>
</template>
</transform>