X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/f938afb8ab4cb091d12e0ef0311eaea14b774798..b170eb5c56df6d11ae6764acb4145eebab972cc1:/redakcja/static/xsl/wl2html_client.xsl?ds=inline diff --git a/redakcja/static/xsl/wl2html_client.xsl b/redakcja/static/xsl/wl2html_client.xsl index 6dd50806..784acb7e 100644 --- a/redakcja/static/xsl/wl2html_client.xsl +++ b/redakcja/static/xsl/wl2html_client.xsl @@ -189,6 +189,16 @@ </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> @@ -203,13 +213,27 @@ </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"> + <div class="motto_container" data-pass-thru="true"> <div x-editable="true"> <xsl:call-template name="standard-attributes" /> <xsl:apply-templates select="child::node()"> @@ -578,7 +602,7 @@ </xsl:choose> </xsl:template> - <xsl:template match="wers_cd|wers_akap|wers_wciety"> + <xsl:template match="wers_cd|wers_akap|wers_wciety|wers_do_prawej"> <xsl:param name="mixed" /> <!-- <xsl:choose> <xsl:when test="ancestor::*[0]/self::strofa"> --> @@ -617,7 +641,7 @@ </em> </xsl:template> - <xsl:template match="wyroznienie|slowo_obce|mat|didask_tekst|osoba|wyp_osoba|www"> + <xsl:template match="wyroznienie|slowo_obce|mat|didask_tekst|osoba|wyp_osoba|www|wieksze_odstepy"> <xsl:param name="mixed" /> <em> <xsl:call-template name="standard-attributes" /> @@ -627,6 +651,16 @@ </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 @@ -634,12 +668,12 @@ --> <xsl:template match="sekcja_swiatlo"> <xsl:param name="mixed" /> - <br><xsl:call-template name="standard-attributes" /></br> + <hr><xsl:call-template name="standard-attributes" /></hr> </xsl:template> <xsl:template match="sekcja_asterysk"> <xsl:param name="mixed" /> - <hr><xsl:call-template name="standard-attributes" /></hr> + <p><xsl:call-template name="standard-attributes" /></p> </xsl:template> <xsl:template match="separator_linia"> @@ -649,7 +683,12 @@ <xsl:template match="zastepnik_wersu"> <xsl:param name="mixed" /> - <hr><xsl:call-template name="standard-attributes" /></hr> + <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> <!-- @@ -728,7 +767,9 @@ <!-- <xsl:value-of select="." /> --> <xsl:param name="mixed" /> <xsl:choose> - <xsl:when test="normalize-space(.) = ''" /> + <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="." /> @@ -753,17 +794,22 @@ <!-- 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 + 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"> - <xsl:param name="mixed" /> - <xsl:apply-templates select="child::node()"> - <xsl:with-param name="mixed" select="$mixed" /> - </xsl:apply-templates> - </xsl:template> + <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 class="unknown-tag" x-node="{name()}"> + <span> + <xsl:call-template name="standard-attributes"> + <xsl:with-param name="extra-class">unknown-tag</xsl:with-param> + </xsl:call-template> <xsl:apply-templates select="child::node()"> <xsl:with-param name="mixed" select="true()" /> </xsl:apply-templates> @@ -806,5 +852,16 @@ </xsl:choose> </xsl:for-each> </xsl:template> - -</xsl:stylesheet> \ No newline at end of file + + <xsl:template match="alien"> + <span class="alien" x-pass-thru="true"> + <xsl:apply-templates select="node()"> + <xsl:with-param name="mixed" select="true()" /> + </xsl:apply-templates> + </span> + </xsl:template> + + <xsl:template match="comment()"> + <xsl:comment><xsl:value-of select="."/></xsl:comment> + </xsl:template> +</xsl:stylesheet>