X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/061f517181630ee982c33aee63965b18965fd5aa..b23f2eb2dba1c6e2c49f45362197b51eee60ac7c:/platforma/static/xsl/wl2html_client.xsl?ds=inline diff --git a/platforma/static/xsl/wl2html_client.xsl b/platforma/static/xsl/wl2html_client.xsl index 234ea5cf..d9758ea2 100755 --- a/platforma/static/xsl/wl2html_client.xsl +++ b/platforma/static/xsl/wl2html_client.xsl @@ -5,11 +5,11 @@ <!-- Dokument ten opisuje jednoznaczne przeksztaÅcenie WLML 0.1 -> XHTML. --> - <xsl:output method="xml" encoding="utf-8" indent="no" /> + <xsl:output method="xml" encoding="utf-8" indent="no" omit-xml-declaration="yes" /> - <xsl:template match="/"> + <!-- <xsl:template match="/"> <xsl:apply-templates select="chunk|utwor" /> - </xsl:template> + </xsl:template> --> <!-- Base tag for rendering a fragment of text @@ -27,7 +27,7 @@ <xsl:template match="utwor"> <div> <xsl:call-template name="standard-attributes" /> - <xsl:apply-templates select="child::*"> + <xsl:apply-templates select="child::* | text()"> <xsl:with-param name="mixed" select="false()" /> </xsl:apply-templates> </div> @@ -212,7 +212,7 @@ --> <xsl:template match="motto"> <xsl:param name="mixed" /> - <div> + <div x-editable="true"> <xsl:call-template name="standard-attributes" /> <xsl:apply-templates select="child::node()"> <xsl:with-param name="mixed" select="true()" /> @@ -432,7 +432,7 @@ <xsl:template match="didaskalia"> <xsl:param name="mixed" /> - <div> + <div x-editable="true"> <xsl:call-template name="standard-attributes" /> <xsl:apply-templates select="child::node()"> <xsl:with-param name="mixed" select="true()" /> @@ -660,6 +660,9 @@ <xsl:template match="begin"> <span> <xsl:call-template name="standard-attributes" /> + <xsl:attribute name="theme-class"> + <xsl:value-of select="substring-after(@id, 'b')" /> + </xsl:attribute> </span> </xsl:template> @@ -673,14 +676,20 @@ <xsl:template match="motyw"> <span x-editable="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" /> - <xsl:value-of select="." /> + <span class="theme-text-list"><xsl:value-of select=".|node()" /></span> </span> </xsl:template> <xsl:template match="end"> <span> - <xsl:call-template name="standard-attributes" /> + <xsl:call-template name="standard-attributes" /> + <xsl:attribute name="theme-class"> + <xsl:value-of select="substring-after(@id, 'e')" /> + </xsl:attribute> </span> </xsl:template> @@ -692,11 +701,11 @@ --> <xsl:template match="text()"> + <!-- <xsl:value-of select="." /> --> <xsl:param name="mixed" /> <xsl:choose> <xsl:when test="normalize-space(.) = ''" /> - <xsl:when test="not($mixed)"><span x-node="out-of-flow-text" class="out-of-flow-text" - x-content="{.}"></span></xsl:when> + <xsl:when test="not($mixed)"><div x-node="out-of-flow-text" class="out-of-flow-text"><xsl:value-of select="." /></div></xsl:when> <xsl:otherwise><xsl:value-of select="." /></xsl:otherwise> </xsl:choose> </xsl:template> @@ -715,19 +724,18 @@ </xsl:template> <xsl:template match="*"> - <xsl:message terminate="no"> - Unmatched tag <xsl:value-of select="name()" /> - </xsl:message> + <error>Unknown tag: <xsl:value-of select="name()" /></error> </xsl:template> <xsl:template name="context-menu"> - <span class="default-menu context-menu"> - <span class="edit-button">Edit</span> - </span> - <span class="edit-menu context-menu"> - <span class="accept-button">OK</span> - <span class="reject-button">Cancel</span> - </span> + <!-- <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">