Remove overspecification from xsl.
authorRadek Czajka <rczajka@rczajka.pl>
Fri, 9 Jul 2021 13:42:19 +0000 (15:42 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Fri, 9 Jul 2021 13:42:19 +0000 (15:42 +0200)
src/documents/migrations/0001_initial.py
src/redakcja/static/css/html.css
src/redakcja/static/xsl/wl2html_client.xsl

index 094828c..451029b 100644 (file)
@@ -100,7 +100,7 @@ class Migration(migrations.Migration):
                 ('description', models.TextField(blank=True, default='', verbose_name='description')),
                 ('created_at', models.DateTimeField(db_index=True, default=datetime.datetime.now, editable=False)),
                 ('publishable', models.BooleanField(default=False, verbose_name='publishable')),
-                ('data', models.FileField(storage=django.core.files.storage.FileSystemStorage(location='/home/rczajka/for/fnp/redakcja/var/repo'), upload_to=dvcs.models.data_upload_to, verbose_name='data')),
+                ('data', models.FileField(storage=django.core.files.storage.FileSystemStorage(location=settings.CATALOGUE_REPO_PATH), upload_to=dvcs.models.data_upload_to, verbose_name='data')),
                 ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='author')),
                 ('merge_parent', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='merge_children', to='documents.ChunkChange', verbose_name='merge parent')),
                 ('parent', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='children', to='documents.ChunkChange', verbose_name='parent')),
@@ -160,7 +160,7 @@ class Migration(migrations.Migration):
                 ('description', models.TextField(blank=True, default='', verbose_name='description')),
                 ('created_at', models.DateTimeField(db_index=True, default=datetime.datetime.now, editable=False)),
                 ('publishable', models.BooleanField(default=False, verbose_name='publishable')),
-                ('data', models.FileField(storage=django.core.files.storage.FileSystemStorage(location='/home/rczajka/for/fnp/redakcja/var/imgrepo'), upload_to=dvcs.models.data_upload_to, verbose_name='data')),
+                ('data', models.FileField(storage=django.core.files.storage.FileSystemStorage(location=settings.CATALOGUE_IMAGE_REPO_PATH), upload_to=dvcs.models.data_upload_to, verbose_name='data')),
                 ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='author')),
                 ('merge_parent', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='merge_children', to='documents.ImageChange', verbose_name='merge parent')),
                 ('parent', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='children', to='documents.ImageChange', verbose_name='parent')),
index 05c9e9e..214e92a 100644 (file)
     padding-left: 90px;
 }
 
-/*
- .htmlview[data-tag-names-visible] *[x-editable]:not(*[x-common])::before {
- display: block;
- float: left;
- clear: left;
- content: attr(x-node);
- font-weight: bold;
- font-style: normal;
- font-variant:normal;
- font-size: 8px;
- line-height: 8px;
- margin-bottom: 4px;
-
- padding: 3px 4px;
- vertical-align: super;
- background-color:#add8e6;
- margin-left: -80px;
- width: 70px;
- text-align: center;
-
- -webkit-border-radius: 4px;
- }
- */
 .htmlview *[x-node = 'RDF'][x-ns = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'] {
     display: none;
 }
@@ -61,7 +38,7 @@
     text-decoration: none;
 }
 
-.htmlview h1 {
+.htmlview .nazwa_utworu {
     font-size: 3em;
     margin: 1.5em 0;
     text-align: center;
     font-weight: bold;
 }
 
-.htmlview h2 {
+.htmlview .autor_utworu,
+.htmlview .dzielo_nadrzedne,
+.htmlview .naglowek_czesc,
+.htmlview .srodtytul,
+.htmlview .naglowek_akt
+{
     font-size: 2em;
     margin: 1.5em 0 0;
     font-weight: bold;
     line-height: 1.5em;
 }
 
-.htmlview h3 {
+.htmlview .podtytul,
+.htmlview .naglowek_scena,
+.htmlview .naglowek_rozdzial
     font-size: 1.5em;
     margin: 1.5em 0 0;
     font-weight: normal;
     line-height: 1.5em;
 }
 
-.htmlview h4 {
+.htmlview .naglowek_podrozdzial,
+.htmlview .naglowek_osoba
+{
     font-size: 1em;
     margin: 1.5em 0 0;
     line-height: 1.5em;
     border-bottom: 0.1em solid #000;
 }
 
-.htmlview p.sekcja_asterysk {
+.htmlview hr.sekcja_asterysk {
+    border: none;
     padding: 0;
     margin: 1.5em 0;
     text-align: center;
 }
 
-.htmlview p.sekcja_asterysk:after {
+.htmlview hr.sekcja_asterysk:after {
     content: "*";
 }
 
     font-style: italic;
 }
 
+
+.htmlview .indeks_dolny {
+    font-style: normal;
+    vertical-align: sub;
+    font-size: .9em;
+}
+
 .htmlview .wyroznienie {
     letter-spacing: 0.1em;
 }
     max-width: 20%;
     max-height: 24pt;
     margin-left: 0.5em;
-    overflow: hidden;
-       z-index: 500;
+    z-index: 500;
 }
 
 div[x-node] > .uwaga {
@@ -352,6 +345,7 @@ div[x-node] > .uwaga {
     margin: 1em;
     max-width: 100%;
     max-height: 100%;
+    border: 1px solid black;
 }
 
 .htmlview .uwaga:hover {
index b277c6a..7afbf97 100644 (file)
@@ -2,10 +2,6 @@
 <xsl:stylesheet version="1.0"    
     xmlns="http://www.w3.org/1999/xhtml"    
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-    <!--
-        Dokument ten opisuje jednoznaczne przekształcenie WLML 0.1 -> XHTML.
-    -->        
     <xsl:output method="html" omit-xml-declaration="yes" encoding="utf-8" indent="no" />
 
     <!--
         </xsl:apply-templates>        
     </xsl:template>
     
-    <!--
-        Base tag for rendering the whole text 
-    -->
-
     <xsl:template match="utwor">
         <div>
             <xsl:call-template name="standard-attributes" />
             </xsl:apply-templates>
         </div>
     </xsl:template>    
-    
-    <!-- 
-        Przekształcenia poszczególnych elementów zgodnie z:            
-        http://wiki.wolnepodreczniki.pl/Lektury:Sk%C5%82ad/Tagi_sk%C5%82adu
-    -->
-
-    <!-- TAGI MASTERÓW STYLÓW
-    
-        Tagi rozpoczynające i kończące tekst utworu lirycznego o standardowej szerokości łamu:
-    -->
-
-    <xsl:template match="opowiadanie|powiesc">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <xsl:template match="liryka_l|liryka_lp">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <xsl:template match="dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <xsl:template match="wywiad">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <!-- 
-        *****************************
-        ELEMENTY POZA TEKSTEM GŁÓWNYM
-        *****************************
-    -->
-
-    <!--
-        Autor składanego utworu
-
-        Element strony tytułowej - lub odpowiadającej jej przestrzeni,
-        np. na stronie internetowej) :
-
-        <autor_utworu> imiona-itd.-autora-składanego-utworu </autor_utworu>
-    -->
-    <xsl:template match="autor_utworu">
-        <xsl:param name="mixed" />
-        <h2 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h2>
-    </xsl:template>
-
-    <!-- 
-        Nazwa składanego utworu
-
-        Element strony tytułowej - lub odpowiadającej jej przestrzeni,
-        np. na stronie internetowej
-
-        <nazwa_utworu> tytuł-składanego-utworu </nazwa_utworu>
-    -->
-    <xsl:template match="nazwa_utworu">
-        <xsl:param name="mixed" />
-        <h1 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h1>
-    </xsl:template>
-
-    <!--
-        Nazwa utworu nadrzędnego, w którego skład wchodzi dany utwór
-        <dzielo_nadrzedne> tytuł-dzieła-nadrzędnego </dzielo_nadrzedne>
-
-         Przykład:
-
-         <utwor>
-         <liryka_l>
-            <autor_utworu>Bruno Jasieński</autor_utworu>
-            <dzielo_nadrzedne>But w butonierce</dzielo_nadrzedne>
-            <nazwa_utworu>Deszcz</nazwa_utworu>
-            ....
-    -->
-    <xsl:template match="dzielo_nadrzedne">
-        <xsl:param name="mixed" />
-        <h2 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h2>
-    </xsl:template>
-
-    <!--
-        Podtytuł, czyli wszystkie dopiski do tytułu
-
-        Element strony tytułowej - lub odpowiadającej jej przestrzeni.
-        <podtytul> podtytuł-składanego-utworu </podtytul>
-
-        Przykład:
-        <utwor>
-            <powiesc>
-            <autor_utworu>Daniel Defoe</autor_utworu>
-            <nazwa_utworu>Robinson Crusoe</nazwa_utworu>
-            <podtytul>Jego życia losy, doświadczenia i przypadki</podtytul>
-            ...
-    -->
-    <xsl:template match="podtytul">
-        <xsl:param name="mixed" />
-        <h3 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h3>
-    </xsl:template>
-
-    <!--
-       Tagi obejmujące tekst noty poprzedzającej tekst główny (styl wieloakapitowy):
-
-        <nota><akap> tekst-noty </akap></nota> (styl wieloakapitowy)
-    -->
-
-    <xsl:template match="nota">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <xsl:template match="nota_red">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <!--
-        Tagi obejmujące tekst dedykacji (styl wieloakapitowy bądź wielostrofowy):
-        <dedykacja> tekst-dedykacji </dedykacja>
-    -->
-    <xsl:template match="dedykacja">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <!--
-        Tagi obejmujące tekst w ramce (styl wieloakapitowy bądź wielostrofowy):
-        <ramka> tekst-w-ramce </ramka>
-    -->
-    <xsl:template match="ramka">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <!--
-        Tagi obejmujące tekst motta (styl wieloakapitowy bądź wielostrofowy):
-        <motto> tekst-motta </motto>
-    -->
-    <xsl:template match="motto">
-        <xsl:param name="mixed" />
-        <div class="motto_container" data-pass-thru="true">
-        <div x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>            
-        </div>
-        <xsl:apply-templates select="following-sibling::*[1][self::motto_podpis]" mode="motto">
-            <xsl:with-param name="mixed" select="true()" />
-        </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <!--  
-        Catch stand-alone "motto_podpis" and make then render properly.
-        If not, editing will fail :(.
-        
-        TODO: Make "motto" & "motto_podpis" one block in edit mode (like strofa) 
-    -->
-    <xsl:template match="motto_podpis[not(preceding-sibling::*[1][self::motto])]">
-       <xsl:apply-templates select="." mode="motto">
-            <xsl:with-param name="mixed" select="true()" />
-        </xsl:apply-templates>
-    </xsl:template>        
-        
-    <xsl:template match="motto_podpis" mode="motto">
-        <xsl:param name="mixed" />
-        <div x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>    
-    
-    <xsl:template match="motto_podpis" />
-    
-    
-
-    <!--
-        Tagi obejmujące listę osób poprzedzającą tekst dramatu
-          (zwykle składaną na osobnej stronie; to odmiana stylu listy):
-
-        <lista_osob> osoby </lista_osob>
-    -->
-    <xsl:template match="lista_osob">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <xsl:template match="naglowek_listy">
-        <xsl:param name="mixed" />
-        <div x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <xsl:template match="lista_osoba">
-        <xsl:param name="mixed" />
-        <div x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <!--  Tagi obejmujące inne komentarze wprowadzające
-        przed tekstem dramatu (składane razem z listą osób):
-
-        <miejsce_czas> komentarze-wprowadzające </miejsce_czas>
-    -->
-    <xsl:template match="miejsce_czas">
-        <xsl:param name="mixed" />
-        <div x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
 
 
-    <!--
-        ***************************
-        TAGI STYLÓW TEKSTU GŁÓWNEGO
-        ***************************
-    -->
-
-    <!--
-      Tagi nagłówka części/księgi:
-      <naglowek_czesc> nagłówek-części-lub-księgi </naglowek_czesc>
-    -->
-    <xsl:template match="naglowek_czesc">
-        <xsl:param name="mixed" />
-        <h2 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h2>
-    </xsl:template>
-
-    <!--
-      Tagi tytułu rozdziału:
-      <naglowek_rozdzial> nr-i/lub-tytuł </naglowek_rozdzial>
-    -->
-    <xsl:template match="naglowek_rozdzial">
-        <xsl:param name="mixed" />
-        <h3 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h3>
-    </xsl:template>
-
-    <!--
-      Tagi tytułu podrozdziału:
-      <naglowek_podrozdzial> nr-i/lub-podtytuł </naglowek_podrozdzial>
-    -->
-    <xsl:template match="naglowek_podrozdzial">
-        <xsl:param name="mixed" />
-        <h4 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h4>
-    </xsl:template>
-
-    <!--
-       Tagi sródtytułu:
-       <srodtytul> śródtytuł </srodtytul>
-
-       Tagi nagłówków aktów:
-       <naglowek_akt> nagłówek-aktu </naglowek_akt>
-    -->
-
-    <xsl:template match="srodtytul">
-        <xsl:param name="mixed" />
-        <h2 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h2>
-    </xsl:template>
-
-    <xsl:template match="naglowek_akt">
-        <xsl:param name="mixed" />
-        <h2 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h2>
-    </xsl:template>
-
-    <!--
-      Tagi nagłówków scen:
-      <naglowek_scena> nagłówek-sceny </naglowek_scena>
-    -->
-
-    <xsl:template match="naglowek_scena">
-        <xsl:param name="mixed" />
-        <h3 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h3>
-    </xsl:template>
-    
-    <xsl:template match="naglowek_osoba">
-        <xsl:param name="mixed" />
-        <h4 x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </h4>
-    </xsl:template>
-
-    <!--
-       ************************
-       Bloki w tekście głównym
-       ************************
-    -->
-    
-    <xsl:template match="dlugi_cytat">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-    
-    <xsl:template match="poezja_cyt">
+    <!-- nieedytowany - zawiera bloki -->
+    <xsl:template match="opowiadanie|powiesc|liryka_l|liryka_lp|dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny|wywiad|nota|nota_red|dedykacja|ramka|lista_osob|dlugi_cytat|poezja_cyt|kwestia|wywiad_pyt|wywiad_odp|motto">
         <xsl:param name="mixed" />
         <div>
             <xsl:call-template name="standard-attributes" />
         </div>
     </xsl:template>
 
-    <xsl:template match="kwestia">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <xsl:template match="didaskalia">
+    <!-- edytowalny - zawiera tekst -->
+    <xsl:template match="didaskalia|naglowek_podrozdzial|naglowek_osoba|podtytul|naglowek_scena|naglowek_rozdzial|autor_utworu|dzielo_nadrzedne|naglowek_czesc|srodtytul|naglowek_akt|nazwa_utworu|naglowek_listy|lista_osoba|miejsce_czas|akap|akap_cd|akap_dialog|motto_podpis|uwaga|extra">
         <xsl:param name="mixed" />
         <div x-editable="true">
             <xsl:call-template name="standard-attributes" />
         </div>
     </xsl:template>
 
-    <xsl:template match="wywiad_pyt">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <xsl:template match="wywiad_odp">
-        <xsl:param name="mixed" />
-        <div>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
     <xsl:template match="ilustr">
       <div>
         <xsl:call-template name="standard-attributes" />
       </div>
     </xsl:template>
 
-    <!--
-        ***********************************
-        Style akapitowe oraz strofy i wersy
-        ***********************************
-    -->
-
-    <xsl:template match="akap">
-        <xsl:param name="mixed" />
-        <div x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <xsl:template match="akap_cd">
-        <xsl:param name="mixed" />
-        <div x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
-    <xsl:template match="akap_dialog">
-        <xsl:param name="mixed" />
-        <div x-editable="true">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </div>
-    </xsl:template>
-
     <!--
         ********
         STROFA
     <xsl:template match="strofa">
         <div x-editable="true">
             <xsl:call-template name="standard-attributes" />
-            <xsl:call-template name="context-menu" />
          
             <xsl:choose>
                 <xsl:when test="count(br) > 0">
 
     <xsl:template match="wers_cd|wers_akap|wers_wciety|wers_do_prawej|wers">
         <xsl:param name="mixed" />
-               <!-- <xsl:choose>
-               <xsl:when test="ancestor::*[0]/self::strofa"> -->
                <div x-verse="true">
                <xsl:call-template name="standard-attributes" />
                <xsl:apply-templates select="child::node()">
                        <xsl:with-param name="mixed" select="true()" />
                </xsl:apply-templates>
                </div>
-               <!-- </xsl:when> 
-               <xsl:choose> -->
     </xsl:template>
 
     <xsl:template match="br"><xsl:text>/</xsl:text></xsl:template>
 
-
-    <!--
-        *************
-        STYLE ZNAKOWE
-        *************
-    -->
-
-    <!--
-        Tagi obejmujące tytuł dzieła, np. książki, filmu, piosenki,
-        modlitwy, przedstawienia teatr. itd.:
-
-        <tytul_dziela> tytuł-dzieła </tytul_dziela>
-    -->
-    <xsl:template match="tytul_dziela">
-        <xsl:param name="mixed" />
-        <em>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </em>
-    </xsl:template>
-
-    <xsl:template match="wyroznienie|slowo_obce|mat|didask_tekst|osoba|wyp_osoba|www|wieksze_odstepy">
+    <!-- Style znakowe -->
+    <xsl:template match="tytul_dziela|wyroznienie|slowo_obce|mat|didask_tekst|osoba|wyp_osoba|www|wieksze_odstepy|indeks_dolny|zastepnik_wersu">
         <xsl:param name="mixed" />
         <em>
             <xsl:call-template name="standard-attributes" />
         </em>
     </xsl:template>
 
-    <xsl:template match="indeks_dolny">
-        <xsl:param name="mixed" />
-        <sub>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </sub>
-    </xsl:template>
-
-    <!--
-        **********
-        SEPARATORY
-        **********
-    -->
-    <xsl:template match="sekcja_swiatlo">
+    <!-- Separatory -->
+    <xsl:template match="sekcja_swiatlo|sekcja_asterysk|separator_linia">
         <xsl:param name="mixed" />
         <hr><xsl:call-template name="standard-attributes" /></hr>
     </xsl:template>
 
-    <xsl:template match="sekcja_asterysk">
-        <xsl:param name="mixed" />
-        <div><xsl:call-template name="standard-attributes" /></div>
-    </xsl:template>
-
-    <xsl:template match="separator_linia">
-        <xsl:param name="mixed" />
-        <hr><xsl:call-template name="standard-attributes" /></hr>
-    </xsl:template>
-
-    <xsl:template match="zastepnik_wersu">
-        <xsl:param name="mixed" />
-        <span>
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </span>
-    </xsl:template>
-
-    <!--
-        *************
-           PRZYPISY
-        *************
-    -->
-
-    <!--
-        Przypisy i motywy
-    -->
+    <!-- Przypisy i motywy -->
     <xsl:template match="pr|pa|pe|pt">       
-        <span x-editable="true" x-common="common">
+        <span x-editable="true">
             <xsl:call-template name="standard-attributes">
                 <xsl:with-param name="extra-class" select="'annotation-inline-box'" />
             </xsl:call-template>
             <a href="#annotation-{generate-id(.)}" class="annotation"></a>
             <!-- inline contents -->
             <span x-annotation-box="true" x-pass-thru="true">
-                <xsl:call-template name="context-menu" />
                 <xsl:apply-templates select="node()">
                     <xsl:with-param name="mixed" select="true()" />
                 </xsl:apply-templates>
     </xsl:template>
 
     <xsl:template match="ref">
-      <span x-editable="true" x-common="common" x-edit-no-format="true" x-edit-attribute="href">
+      <span x-editable="true" x-edit-no-format="true" x-edit-attribute="href">
         <xsl:call-template name="standard-attributes">
           <xsl:with-param name="extra-class" select="'reference-inline-box'" />
         </xsl:call-template>
         </span>
     </xsl:template>
 
-    <xsl:template match="extra|uwaga">
-        <span x-common="common">
-            <xsl:call-template name="standard-attributes" />
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
-            </xsl:apply-templates>
-        </span>
-    </xsl:template>
-
     <xsl:template match="motyw">
-        <span x-editable="true" x-edit-no-format="true" x-common="common">
+        <span x-editable="true" x-edit-no-format="true">
             <xsl:call-template name="standard-attributes" />
             <xsl:attribute name="theme-class">
                 <xsl:value-of select="substring-after(@id, 'm')" />
             </xsl:attribute>
-            <xsl:call-template name="context-menu" />
             <span x-pass-thru="true" class="theme-text-list"><xsl:value-of select=".|node()" /></span>
         </span>
     </xsl:template>
     </xsl:template>
 
 
-    <!--
-        ****************
-         TEKST WŁAŚCIWY
-        ****************
-    -->
-
+    <!-- Tekst -->
     <xsl:template match="text()">
-        <!-- <xsl:value-of select="." /> -->
-        <xsl:param name="mixed" />
-        <xsl:choose>
-            <xsl:when test="normalize-space(.) = ''">
-                <xsl:value-of select="." />
-            </xsl:when>
-            <xsl:when test="not($mixed)">
-               <span x-node="out-of-flow-text" class="out-of-flow-text" x-editable="true">
-                       <xsl:value-of select="." />
-                               </span>
-                       </xsl:when>
-            <xsl:otherwise><xsl:value-of select="." /></xsl:otherwise>
-        </xsl:choose>
+      <!-- <xsl:value-of select="." /> -->
+      <xsl:param name="mixed" />
+      <xsl:choose>
+        <xsl:when test="normalize-space(.) = ''">
+          <xsl:value-of select="." />
+        </xsl:when>
+        <xsl:when test="not($mixed)">
+          <span x-node="out-of-flow-text" class="out-of-flow-text" x-editable="true">
+            <xsl:value-of select="." />
+         </span>
+       </xsl:when>
+        <xsl:otherwise><xsl:value-of select="." /></xsl:otherwise>
+      </xsl:choose>
     </xsl:template>
 
     <xsl:template match="comment()">
         </span>
     </xsl:template>
        
-       <!-- 
-               Earlier versions of html2wl introduced a BUG, that 'causes "out-of-flow-text" tag to appear.
-               Instead of marking it as "unknown", just pass thru it.
-               Keep a pass-thru span for out-of-flow box editing
-       -->
-    <xsl:template match="out-of-flow-text">
-        <span data-pass-thru="true">
-            <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="false()" />
-            </xsl:apply-templates>        
-        </span>
-    </xsl:template>
-
     <xsl:template match="*">
         <span>
             <xsl:call-template name="standard-attributes">
         </span>
     </xsl:template>
 
-    <xsl:template name="context-menu">
-        <!-- <span class="default-menu context-menu"> -->
-        <!-- <button class="edit-button">Edytuj</button> -->
-            <!-- <span class="delete-button">Delete</span> -->
-        <!-- </span> -->
-        <!-- <span class="edit-menu context-menu">
-            <span class="accept-button">Accept</span>
-            <span class="reject-button">Close</span>
-        </span> -->
-    </xsl:template>
-
     <xsl:template name="standard-attributes">
         <xsl:param name="extra-class" />
         <xsl:attribute name="class"><xsl:value-of select="local-name()" /><xsl:text>&#x0020;</xsl:text><xsl:value-of select="$extra-class" /></xsl:attribute>