Commit b3a1a183 authored by Alex Theg's avatar Alex Theg

rename folder; add itemizer sheet

parent 16779e2f
<?xml version="1.0" encoding="UTF-8"?>
<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec" stylesheet="detect-numbered-lists.xsl"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsw="http://coko.foundation/xsweet"
>
<x:scenario>
<x:label>Basic</x:label>
<x:context>
<div class="docx-body">
<p>Not inside a list</p>
<p>1. Here's a list.</p>
<p>2. With a second item.</p>
<p>3. And a third like like this.</p>
</div>
</x:context>
<x:expect label="as list items">
<div class="docx-body">
<p>Not inside a list</p>
<xsw:list level="0" >
<p>1. Here's a list.</p>
<p>2. With a second item.</p>
<p>3. And a third like like this.</p>
</xsw:list>
</div>
</x:expect>
</x:scenario>
</x:description>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="3.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsw="http://coko.foundation/xsweet"
xmlns="http://www.w3.org/1999/xhtml"
xpath-default-namespace="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="#all">
<xsl:output method="xml" indent="no" omit-xml-declaration="yes"/>
<!-- Redundant match silences noisy XSLT engines -->
<xsl:template match="node() | @* | html:html" xmlns:html="http://www.w3.org/1999/xhtml">
<xsl:copy copy-namespaces="no">
<xsl:apply-templates select="node() | @*"/>
</xsl:copy>
</xsl:template>
<!-- Groups can be unwrapped since the induced list structure takes care of everything. -->
<xsl:template match="xsw:list">
<ol>
<xsl:for-each-group select="*" group-starting-with="p">
<li>
<xsl:apply-templates select="current-group()"/>
</li>
</xsl:for-each-group>
</ol>
</xsl:template>
</xsl:stylesheet>
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