Patrick Hess wrote:


... <Body> &lt;b&gt;hello world&lt;/b&gt; <Body> ...

when I would like to have:

...
   <Body>
    <b>hello world</b>
   <Body>
...

For the HTML editor this seems to be perfectly alright because editing such a file (as 1st example) is ok! So might need to escape the tags again when preparing the form after solving my current problem. Is there a solution available?


For the Lenya form editor we are using an XSLT

src/webapp/lenya/xslt/authoring/edit/copy-mixed-content.xsl

resp.

<xsl:template match="//*" mode="mixedcontent" priority="-1">
<xsl:variable name="prefix"><xsl:if test="contains(name(),':')">:<xsl:value-of select="substring-before(name(),':')"/></xsl:if></xsl:variable>


<xsl:choose>
<xsl:when test="node()">
<xsl:text>&lt;</xsl:text><xsl:value-of select="name()"/><xsl:if test="namespace-uri()"><xsl:text> </xsl:text>xmlns<xsl:value-of select="$prefix"/>="<xsl:value-of select="namespace-uri()"/>"</xsl:if><xsl:apply-templates select="@*[local-name()!='tagID']" mode="mixedcontent"/><xsl:text>&gt;</xsl:text>
<xsl:apply-templates select="node()" mode="mixedcontent"/>
<xsl:text>&lt;/</xsl:text><xsl:value-of select="name()"/><xsl:text>&gt;</xsl:text>
</xsl:when>


<xsl:otherwise>
<xsl:text>&lt;</xsl:text><xsl:value-of select="name()"/><xsl:if test="namespace-uri()"><xsl:text> </xsl:text>xmlns<xsl:value-of select="$prefix"/>="<xsl:value-of select="namespace-uri()"/>"</xsl:if><xsl:apply-templates select="@*[local-name()!='tagID']" mode="mixedcontent"/><xsl:text> /&gt;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>



btw, this week will be hackathon/sprint on Epoz at


http://www.oscom.org/Conferences/Sprints/3.%20Z%FCrich%20January%202004/

another Midas based editor. People might want to join it on IRC at

irc.freenode.org#oscom

HTH

Michi




Thanks for reading,
  Patrick





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to