You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by mi...@apache.org on 2003/10/28 01:53:03 UTC
cvs commit: cocoon-lenya/src/webapp/lenya/xslt/authoring/edit oneform.xsl
michi 2003/10/27 16:53:03
Modified: src/webapp/lenya/pubs/blog/xslt/feed body.xsl
src/webapp/lenya/xslt/authoring/edit oneform.xsl
Log:
empty tag problem fixed
Revision Changes Path
1.9 +2 -2 cocoon-lenya/src/webapp/lenya/pubs/blog/xslt/feed/body.xsl
Index: body.xsl
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/blog/xslt/feed/body.xsl,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- body.xsl 23 Oct 2003 22:32:51 -0000 1.8
+++ body.xsl 28 Oct 2003 00:53:02 -0000 1.9
@@ -13,14 +13,14 @@
<xsl:template match="entry">
<div class="dateline"><xsl:value-of select="issued"/></div>
- <div class="title"><a href="../../entries/{id}/index.html"><xsl:value-of select="title"/></a></div>
+ <div class="title"><a href="../../entries/{normalize-space(id)}/index.html"><xsl:value-of select="title"/></a></div>
<xsl:apply-templates select="summary"/>
<xsl:apply-templates select="content"/>
<xsl:apply-templates select="echo:content"/>
<p class="issued">
- <b>Posted <xsl:apply-templates select="author"/> at <xsl:value-of select="issued"/></b> | <a href="../../entries/{id}/index.html">Permalink</a>
+ <b>Posted <xsl:apply-templates select="author"/> at <xsl:value-of select="issued"/></b> | <a href="../../entries/{normalize-space(id)}/index.html">Permalink</a>
</p>
</xsl:template>
1.2 +28 -2 cocoon-lenya/src/webapp/lenya/xslt/authoring/edit/oneform.xsl
Index: oneform.xsl
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/xslt/authoring/edit/oneform.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- oneform.xsl 27 Oct 2003 11:26:13 -0000 1.1
+++ oneform.xsl 28 Oct 2003 00:53:03 -0000 1.2
@@ -5,12 +5,16 @@
>
<xsl:param name="docid"/>
+<xsl:param name="cols" select="'80'"/>
+<xsl:param name="rows" select="'30'"/>
<xsl:template match="/">
<html>
<body>
<p>
Edit Document <b><xsl:value-of select="$docid"/></b>
+<br/>Cols = <xsl:value-of select="$cols"/>
+<br/>Rows = <xsl:value-of select="$rows"/>
</p>
<form method="post" action="?lenya.usecase=1formedit&lenya.step=close">
@@ -19,7 +23,7 @@
<td align="right"><input type="submit" value="SAVE" name="save"/><input type="submit" value="CANCEL" name="cancel"/></td>
</tr>
<tr><td>
-<textarea name="content" cols="40" rows="30">
+<textarea name="content" cols="{$cols}" rows="{$rows}">
<xsl:apply-templates mode="mixed"/>
</textarea>
</td></tr>
@@ -41,12 +45,34 @@
</html>
</xsl:template>
+
+
<!-- Copy mixed content -->
+
<xsl:template match="//*" mode="mixed">
+<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: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="@*" mode="mixed"/>>
+<xsl:apply-templates select="node()" mode="mixed"/>
+</<xsl:value-of select="name()"/>>
+</xsl:when>
+<xsl:otherwise>
+<<xsl:value-of select="name()"/> />
+</xsl:otherwise>
+</xsl:choose>
+
+<!-- FIXME: <br /> are transformed into <br> by the html serializer -->
+<!--
<xsl:copy>
-<xsl:copy-of select="@*[local-name()!='tagID']"/>
+<xsl:copy-of select="@*"/>
<xsl:apply-templates select="node()" mode="mixed"/>
</xsl:copy>
+-->
</xsl:template>
+
+<xsl:template match="@*" mode="mixed">
+<xsl:text> </xsl:text><xsl:value-of select="name()"/>="<xsl:value-of select="."/>"</xsl:template>
</xsl:stylesheet>
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org