Skip to content

Commit 1467d56

Browse files
committed
Merged branch '4.3'
2 parents f81760f + 3711ae5 commit 1467d56

File tree

10 files changed

+327
-0
lines changed

10 files changed

+327
-0
lines changed

src/bundle/Resources/richtext/schemas/docbook/ezpublish.rng

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,23 @@
6262
</zeroOrMore>
6363
</define>
6464

65+
<!-- Adding 'arabicleadingzero' to db.orderedlist.numeration.enumeration as this is exposed in editor from Ibexa DXP 4.0 -->
66+
<define name="db.orderedlist.numeration.enumeration">
67+
<choice>
68+
<value>arabic</value>
69+
<a:documentation>Specifies Arabic numeration (1, 2, 3, …)</a:documentation>
70+
<value>arabicleadingzero</value>
71+
<a:documentation>Specifies Arabic numeration with leading zero(01, 02, 03, …)</a:documentation>
72+
<value>upperalpha</value>
73+
<a:documentation>Specifies upper-case alphabetic numeration (A, B, C, …)</a:documentation>
74+
<value>loweralpha</value>
75+
<a:documentation>Specifies lower-case alphabetic numeration (a, b, c, …)</a:documentation>
76+
<value>upperroman</value>
77+
<a:documentation>Specifies upper-case Roman numeration (I, II, III, …)</a:documentation>
78+
<value>lowerroman</value>
79+
<a:documentation>Specifies lower-case Roman numeration (i, ii, iii …)</a:documentation>
80+
</choice>
81+
</define>
6582
<define name="db.orderedlist">
6683
<element name="orderedlist">
6784
<a:documentation>A list in which each entry is marked with a sequentially incremented label</a:documentation>

src/bundle/Resources/richtext/stylesheets/docbook/xhtml5/edit/core.xsl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,12 @@
317317
<xsl:value-of select="@ezxhtml:class"/>
318318
</xsl:attribute>
319319
</xsl:if>
320+
<xsl:if test="@numeration = 'arabic'"><xsl:attribute name="style">list-style-type:decimal;</xsl:attribute></xsl:if>
321+
<xsl:if test="@numeration = 'arabicleadingzero'"><xsl:attribute name="style">list-style-type:decimal-leading-zero;</xsl:attribute></xsl:if>
322+
<xsl:if test="@numeration = 'lowerroman'"><xsl:attribute name="style">list-style-type:lower-roman;</xsl:attribute></xsl:if>
323+
<xsl:if test="@numeration = 'upperroman'"><xsl:attribute name="style">list-style-type:upper-roman;</xsl:attribute></xsl:if>
324+
<xsl:if test="@numeration = 'loweralpha'"><xsl:attribute name="style">list-style-type:lower-latin;</xsl:attribute></xsl:if>
325+
<xsl:if test="@numeration = 'upperalpha'"><xsl:attribute name="style">list-style-type:upper-latin;</xsl:attribute></xsl:if>
320326
<xsl:call-template name="ezattribute"/>
321327
<xsl:apply-templates/>
322328
</xsl:element>
@@ -334,6 +340,11 @@
334340
<xsl:value-of select="@ezxhtml:class"/>
335341
</xsl:attribute>
336342
</xsl:if>
343+
<xsl:if test="@mark">
344+
<xsl:attribute name="style">
345+
<xsl:value-of select="concat('list-style-type:', @mark, ';')"/>
346+
</xsl:attribute>
347+
</xsl:if>
337348
<xsl:call-template name="ezattribute"/>
338349
<xsl:apply-templates/>
339350
</xsl:element>

src/bundle/Resources/richtext/stylesheets/docbook/xhtml5/output/core.xsl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,12 @@
325325
<xsl:value-of select="@ezxhtml:class"/>
326326
</xsl:attribute>
327327
</xsl:if>
328+
<xsl:if test="@numeration = 'arabic'"><xsl:attribute name="style">list-style-type:decimal;</xsl:attribute></xsl:if>
329+
<xsl:if test="@numeration = 'arabicleadingzero'"><xsl:attribute name="style">list-style-type:decimal-leading-zero;</xsl:attribute></xsl:if>
330+
<xsl:if test="@numeration = 'lowerroman'"><xsl:attribute name="style">list-style-type:lower-roman;</xsl:attribute></xsl:if>
331+
<xsl:if test="@numeration = 'upperroman'"><xsl:attribute name="style">list-style-type:upper-roman;</xsl:attribute></xsl:if>
332+
<xsl:if test="@numeration = 'loweralpha'"><xsl:attribute name="style">list-style-type:lower-latin;</xsl:attribute></xsl:if>
333+
<xsl:if test="@numeration = 'upperalpha'"><xsl:attribute name="style">list-style-type:upper-latin;</xsl:attribute></xsl:if>
328334
<xsl:call-template name="ezattribute"/>
329335
<xsl:apply-templates/>
330336
</xsl:element>
@@ -342,6 +348,11 @@
342348
<xsl:value-of select="@ezxhtml:class"/>
343349
</xsl:attribute>
344350
</xsl:if>
351+
<xsl:if test="@mark">
352+
<xsl:attribute name="style">
353+
<xsl:value-of select="concat('list-style-type:', @mark, ';')"/>
354+
</xsl:attribute>
355+
</xsl:if>
345356
<xsl:call-template name="ezattribute"/>
346357
<xsl:apply-templates/>
347358
</xsl:element>

src/bundle/Resources/richtext/stylesheets/xhtml5/edit/docbook.xsl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,16 @@
344344
<xsl:value-of select="@class"/>
345345
</xsl:attribute>
346346
</xsl:if>
347+
<xsl:if test="@style">
348+
<xsl:attribute name="numeration">
349+
<xsl:if test="@style = 'list-style-type:decimal;'">arabic</xsl:if>
350+
<xsl:if test="@style = 'list-style-type:decimal-leading-zero;'">arabicleadingzero</xsl:if>
351+
<xsl:if test="@style = 'list-style-type:lower-roman;'">lowerroman</xsl:if>
352+
<xsl:if test="@style = 'list-style-type:upper-roman;'">upperroman</xsl:if>
353+
<xsl:if test="@style = 'list-style-type:lower-latin;'">loweralpha</xsl:if>
354+
<xsl:if test="@style = 'list-style-type:upper-latin;'">upperalpha</xsl:if>
355+
</xsl:attribute>
356+
</xsl:if>
347357
<xsl:call-template name="ezattribute"/>
348358
<xsl:apply-templates/>
349359
</orderedlist>
@@ -361,6 +371,14 @@
361371
<xsl:value-of select="@class"/>
362372
</xsl:attribute>
363373
</xsl:if>
374+
<xsl:if test="contains( @style, 'list-style-type:' )">
375+
<xsl:attribute name="mark">
376+
<xsl:call-template name="extractStyleValue">
377+
<xsl:with-param name="style" select="@style"/>
378+
<xsl:with-param name="property" select="'list-style-type'"/>
379+
</xsl:call-template>
380+
</xsl:attribute>
381+
</xsl:if>
364382
<xsl:call-template name="ezattribute"/>
365383
<xsl:apply-templates/>
366384
</itemizedlist>
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<section xmlns="http://docbook.org/ns/docbook"
3+
xmlns:xlink="http://www.w3.org/1999/xlink"
4+
xmlns:ezxhtml="http://ibexa.co/xmlns/dxp/docbook/xhtml"
5+
xmlns:ezcustom="http://ibexa.co/xmlns/dxp/docbook/custom"
6+
version="5.0-variant ezpublish-1.0">
7+
<itemizedlist mark="disc">
8+
<ezattribute>
9+
<ezvalue key="name-1">value 1</ezvalue>
10+
<ezvalue key="name-2">value 2</ezvalue>
11+
<ezvalue key="name-3">value 3</ezvalue>
12+
</ezattribute>
13+
<listitem ezxhtml:class="listItemClass">
14+
<ezattribute>
15+
<ezvalue key="name-2">value 2</ezvalue>
16+
</ezattribute>
17+
<para ezxhtml:class="listItemClass">
18+
<ezattribute>
19+
<ezvalue key="name-2">value 2</ezvalue>
20+
</ezattribute>This is a list item.</para>
21+
</listitem>
22+
<listitem ezxhtml:class="listItemClass">
23+
<ezattribute>
24+
<ezvalue key="name-3">value 3</ezvalue>
25+
</ezattribute>
26+
<para ezxhtml:class="listItemClass">
27+
<ezattribute>
28+
<ezvalue key="name-3">value 3</ezvalue>
29+
</ezattribute>
30+
<literallayout class="normal">This is a list item
31+
with a line break.</literallayout>
32+
</para>
33+
</listitem>
34+
</itemizedlist>
35+
<itemizedlist mark="circle">
36+
<ezattribute>
37+
<ezvalue key="name-1">value 1</ezvalue>
38+
<ezvalue key="name-2">value 2</ezvalue>
39+
<ezvalue key="name-3">value 3</ezvalue>
40+
</ezattribute>
41+
<listitem ezxhtml:class="listItemClass">
42+
<ezattribute>
43+
<ezvalue key="name-2">value 2</ezvalue>
44+
</ezattribute>
45+
<para ezxhtml:class="listItemClass">
46+
<ezattribute>
47+
<ezvalue key="name-2">value 2</ezvalue>
48+
</ezattribute>This is a list item.</para>
49+
</listitem>
50+
<listitem ezxhtml:class="listItemClass">
51+
<ezattribute>
52+
<ezvalue key="name-3">value 3</ezvalue>
53+
</ezattribute>
54+
<para ezxhtml:class="listItemClass">
55+
<ezattribute>
56+
<ezvalue key="name-3">value 3</ezvalue>
57+
</ezattribute>
58+
<literallayout class="normal">This is a list item
59+
with a line break.</literallayout>
60+
</para>
61+
</listitem>
62+
</itemizedlist>
63+
<itemizedlist mark="square">
64+
<ezattribute>
65+
<ezvalue key="name-1">value 1</ezvalue>
66+
<ezvalue key="name-2">value 2</ezvalue>
67+
<ezvalue key="name-3">value 3</ezvalue>
68+
</ezattribute>
69+
<listitem ezxhtml:class="listItemClass">
70+
<ezattribute>
71+
<ezvalue key="name-2">value 2</ezvalue>
72+
</ezattribute>
73+
<para ezxhtml:class="listItemClass"><ezattribute><ezvalue key="name-2">value 2</ezvalue></ezattribute>This is a list item.</para>
74+
</listitem>
75+
<listitem ezxhtml:class="listItemClass">
76+
<ezattribute>
77+
<ezvalue key="name-3">value 3</ezvalue>
78+
</ezattribute>
79+
<para ezxhtml:class="listItemClass">
80+
<ezattribute>
81+
<ezvalue key="name-3">value 3</ezvalue>
82+
</ezattribute>
83+
<literallayout class="normal">This is a list item
84+
with a line break.</literallayout>
85+
</para>
86+
</listitem>
87+
</itemizedlist>
88+
</section>
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<section xmlns="http://docbook.org/ns/docbook"
3+
xmlns:xlink="http://www.w3.org/1999/xlink"
4+
xmlns:ezxhtml="http://ibexa.co/xmlns/dxp/docbook/xhtml"
5+
xmlns:ezcustom="http://ibexa.co/xmlns/dxp/docbook/custom"
6+
version="5.0-variant ezpublish-1.0">
7+
<para>default</para>
8+
<orderedlist>
9+
<listitem>
10+
<para>default 1</para>
11+
</listitem>
12+
<listitem>
13+
<para>default 2</para>
14+
</listitem>
15+
</orderedlist>
16+
<para>decimal</para>
17+
<orderedlist numeration="arabic">
18+
<listitem>
19+
<para>decimal 1</para>
20+
</listitem>
21+
<listitem>
22+
<para>decimal 2</para>
23+
</listitem>
24+
</orderedlist>
25+
<para>decimal leading zero</para>
26+
<orderedlist numeration="arabicleadingzero">
27+
<listitem>
28+
<para>decimal leading zero 1</para>
29+
</listitem>
30+
<listitem>
31+
<para>decimal leading zero 2</para>
32+
</listitem>
33+
</orderedlist>
34+
<para>lower roman</para>
35+
<orderedlist numeration="lowerroman">
36+
<listitem>
37+
<para>lower roman 1</para>
38+
</listitem>
39+
<listitem>
40+
<para>lower roman 2</para>
41+
</listitem>
42+
</orderedlist>
43+
<para>upper roman</para>
44+
<orderedlist numeration="upperroman">
45+
<listitem>
46+
<para>upper roman 1</para>
47+
</listitem>
48+
</orderedlist>
49+
<orderedlist>
50+
<listitem>
51+
<para>upper roman 2</para>
52+
</listitem>
53+
</orderedlist>
54+
<para>lower latin</para>
55+
<orderedlist numeration="loweralpha">
56+
<listitem>
57+
<para>lower latin 1</para>
58+
</listitem>
59+
<listitem>
60+
<para>lower latin 2</para>
61+
</listitem>
62+
</orderedlist>
63+
<para>upper latin</para>
64+
<orderedlist numeration="upperalpha">
65+
<listitem>
66+
<para>upper latin 1</para>
67+
</listitem>
68+
<listitem>
69+
<para>upper latin 2</para>
70+
</listitem>
71+
</orderedlist>
72+
</section>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit">
3+
<ul style="list-style-type:disc;" data-ezattribute-name-1="value 1" data-ezattribute-name-2="value 2" data-ezattribute-name-3="value 3">
4+
<li class="listItemClass" data-ezattribute-name-2="value 2">This is a list item.</li>
5+
<li class="listItemClass" data-ezattribute-name-3="value 3">This is a list item<br/>with a line break.</li>
6+
</ul>
7+
<ul style="list-style-type:circle;" data-ezattribute-name-1="value 1" data-ezattribute-name-2="value 2" data-ezattribute-name-3="value 3">
8+
<li class="listItemClass" data-ezattribute-name-2="value 2">This is a list item.</li>
9+
<li class="listItemClass" data-ezattribute-name-3="value 3">This is a list item<br/>with a line break.</li>
10+
</ul>
11+
<ul style="list-style-type:square;" data-ezattribute-name-1="value 1" data-ezattribute-name-2="value 2" data-ezattribute-name-3="value 3">
12+
<li class="listItemClass" data-ezattribute-name-2="value 2">This is a list item.</li>
13+
<li class="listItemClass" data-ezattribute-name-3="value 3">This is a list item<br/>with a line break.</li>
14+
</ul>
15+
</section>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit">
3+
<p>default</p>
4+
<ol>
5+
<li>default 1</li>
6+
<li>default 2</li>
7+
</ol>
8+
<p>decimal</p>
9+
<ol style="list-style-type:decimal;">
10+
<li>decimal 1</li>
11+
<li>decimal 2</li>
12+
</ol>
13+
<p>decimal leading zero</p>
14+
<ol style="list-style-type:decimal-leading-zero;">
15+
<li>decimal leading zero 1</li>
16+
<li>decimal leading zero 2</li>
17+
</ol>
18+
<p>lower roman</p>
19+
<ol style="list-style-type:lower-roman;">
20+
<li>lower roman 1</li>
21+
<li>lower roman 2</li>
22+
</ol>
23+
<p>upper roman</p>
24+
<ol style="list-style-type:upper-roman;">
25+
<li>upper roman 1</li>
26+
</ol>
27+
<ol>
28+
<li>upper roman 2</li>
29+
</ol>
30+
<p>lower latin</p>
31+
<ol style="list-style-type:lower-latin;">
32+
<li>lower latin 1</li>
33+
<li>lower latin 2</li>
34+
</ol>
35+
<p>upper latin</p>
36+
<ol style="list-style-type:upper-latin;">
37+
<li>upper latin 1</li>
38+
<li>upper latin 2</li>
39+
</ol>
40+
</section>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5">
3+
<ul style="list-style-type:disc;" data-ezattribute-name-1="value 1" data-ezattribute-name-2="value 2" data-ezattribute-name-3="value 3">
4+
<li class="listItemClass" data-ezattribute-name-2="value 2">This is a list item.</li>
5+
<li class="listItemClass" data-ezattribute-name-3="value 3">This is a list item<br/>with a line break.</li>
6+
</ul>
7+
<ul style="list-style-type:circle;" data-ezattribute-name-1="value 1" data-ezattribute-name-2="value 2" data-ezattribute-name-3="value 3">
8+
<li class="listItemClass" data-ezattribute-name-2="value 2">This is a list item.</li>
9+
<li class="listItemClass" data-ezattribute-name-3="value 3">This is a list item<br/>with a line break.</li>
10+
</ul>
11+
<ul style="list-style-type:square;" data-ezattribute-name-1="value 1" data-ezattribute-name-2="value 2" data-ezattribute-name-3="value 3">
12+
<li class="listItemClass" data-ezattribute-name-2="value 2">This is a list item.</li>
13+
<li class="listItemClass" data-ezattribute-name-3="value 3">This is a list item<br/>with a line break.</li>
14+
</ul>
15+
</section>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5">
3+
<p>default</p>
4+
<ol>
5+
<li>default 1</li>
6+
<li>default 2</li>
7+
</ol>
8+
<p>decimal</p>
9+
<ol style="list-style-type:decimal;">
10+
<li>decimal 1</li>
11+
<li>decimal 2</li>
12+
</ol>
13+
<p>decimal leading zero</p>
14+
<ol style="list-style-type:decimal-leading-zero;">
15+
<li>decimal leading zero 1</li>
16+
<li>decimal leading zero 2</li>
17+
</ol>
18+
<p>lower roman</p>
19+
<ol style="list-style-type:lower-roman;">
20+
<li>lower roman 1</li>
21+
<li>lower roman 2</li>
22+
</ol>
23+
<p>upper roman</p>
24+
<ol style="list-style-type:upper-roman;">
25+
<li>upper roman 1</li>
26+
</ol>
27+
<ol>
28+
<li>upper roman 2</li>
29+
</ol>
30+
<p>lower latin</p>
31+
<ol style="list-style-type:lower-latin;">
32+
<li>lower latin 1</li>
33+
<li>lower latin 2</li>
34+
</ol>
35+
<p>upper latin</p>
36+
<ol style="list-style-type:upper-latin;">
37+
<li>upper latin 1</li>
38+
<li>upper latin 2</li>
39+
</ol>
40+
</section>

0 commit comments

Comments
 (0)