Commit bca1d9d9 authored by Wendell Piez's avatar Wendell Piez

Updating outline-level-based header promotion: see XSweet issue 152

parent cd702930
......@@ -52,7 +52,7 @@ declare namespace xsw ="http://coko.foundation/xsweet";
<xsl:variable name="mapping-spec" as="xs:string?"
select="$method[matches(., '\.xml$')] ! (if (doc-available(.)) then (.) else ())"/>
<xsl:variable name="outlined" select="count(//p[matches(@style, 'xsweet-outline-level')]) gt 1"/>
<xsl:variable name="outlined" select="count(//p/@data-xsweet-outline-level gt 1)"/>
<!--XSweet mini-pipelining-language semantics:
......
......@@ -22,7 +22,8 @@
<xsl:function name="xsw:outline-level" as="xs:integer?">
<xsl:param name="who" as="node()"/>
<xsl:variable name="outline-spec" select="replace($who/@style,'^.*xsweet\-outline\-level:\s*','')"/>
<!--<xsl:variable name="outline-spec" select="replace($who/@style,'^.*xsweet\-outline\-level:\s*','')"/>-->
<xsl:variable name="outline-spec" select="$who/@data-xsweet-outline-level"/>
<xsl:variable name="outline-level" select="replace($outline-spec,'\D.*$','')"/>
<xsl:if test="$outline-level castable as xs:integer">
<xsl:sequence select="xs:integer($outline-level) + 1"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment