X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/f938afb8ab4cb091d12e0ef0311eaea14b774798..c58ede829174b66ec4d2b0c949b771a3eed27e1b:/redakcja/static/xsl/wl2html_client.xsl?ds=sidebyside diff --git a/redakcja/static/xsl/wl2html_client.xsl b/redakcja/static/xsl/wl2html_client.xsl index 6dd50806..f5f4e04d 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> @@ -209,7 +219,7 @@ --> <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()"> @@ -634,12 +644,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 +659,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 +743,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 +770,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 +828,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>