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/19 13:16:06 UTC
cvs commit: cocoon-lenya/src/webapp/lenya/pubs/blog/xslt/entry body.xsl
michi 2003/10/19 04:16:06
Modified: src/webapp/lenya/pubs/blog/config/doctypes/samples entry.xml
src/webapp/lenya/pubs/blog/lenya/xslt/formeditor entry.xsl
src/webapp/lenya/pubs/blog/xslt/entry body.xsl
Log:
XHTML content field added
Revision Changes Path
1.6 +6 -0 cocoon-lenya/src/webapp/lenya/pubs/blog/config/doctypes/samples/entry.xml
Index: entry.xml
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/blog/config/doctypes/samples/entry.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- entry.xml 11 Sep 2003 18:00:35 -0000 1.5
+++ entry.xml 19 Oct 2003 11:16:06 -0000 1.6
@@ -25,9 +25,15 @@
<echo:issued>2003-02-05T08:29:29-04:00</echo:issued>
<echo:modified>2003-02-05T12:29:29Z</echo:modified>
+ <echo:content type="text/xhtml" xml:lang="en-us">
+ <p>Hello, <i><b>weblog</b> <a href="http://www.apache.org">world</a></i>!</p>
+ </echo:content>
+
+<!--
<echo:content type="text/plain" xml:lang="en-us" mode="escaped">
<![CDATA[ Plain Text (as CDATA): < & > ]]>
</echo:content>
+-->
<!--
<echo:content type="application/xhtml+xml" xml:lang="en-us">
1.8 +36 -4 cocoon-lenya/src/webapp/lenya/pubs/blog/lenya/xslt/formeditor/entry.xsl
Index: entry.xsl
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/blog/lenya/xslt/formeditor/entry.xsl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- entry.xsl 14 Oct 2003 09:00:45 -0000 1.7
+++ entry.xsl 19 Oct 2003 11:16:06 -0000 1.8
@@ -29,9 +29,15 @@
<xsl:apply-templates select="echo:content"/>
<tr>
- <td><input type="image" src="/lenya/lenya/images/insert.gif" name="<xupdate:append select="/echo:entry"><xupdate:element name="echo:content" namespace="http://purl.org/atom/ns#"><xupdate:attribute name="type">text/plain</xupdate:attribute>New content</xupdate:element></xupdate:append>" value="LENYA"/></td>
+ <td><input type="image" src="/lenya/lenya/images/insert.gif" name="<xupdate:append select="/echo:entry"><xupdate:element name="echo:content" namespace="http://purl.org/atom/ns#"><xupdate:attribute name="type">text/xhtml</xupdate:attribute>New XHTML content</xupdate:element></xupdate:append>" value="LENYA"/></td>
+ <td colspan="2">Content (text/xhtml)</td>
+</tr>
+<!--
+<tr>
+ <td><input type="image" src="/lenya/lenya/images/insert.gif" name="<xupdate:append select="/echo:entry"><xupdate:element name="echo:content" namespace="http://purl.org/atom/ns#"><xupdate:attribute name="type">text/plain</xupdate:attribute>New CDATA content</xupdate:element></xupdate:append>" value="LENYA"/></td>
<td colspan="2">Content (text/plain as CDATA)</td>
</tr>
+-->
</xsl:template>
<xsl:template match="echo:summary">
@@ -42,6 +48,7 @@
</tr>
</xsl:template>
+
<xsl:template match="echo:content[@type='text/plain']">
<tr>
<td><input type="image" src="/lenya/lenya/images/insert.gif" name="<xupdate:insert-before select="/echo:entry/echo:content[@tagID='{@tagID}']"><xupdate:element name="echo:content" namespace="http://purl.org/atom/ns#"><xupdate:attribute name="type">text/plain</xupdate:attribute>New content</xupdate:element></xupdate:insert-before>" value="LENYA"/></td>
@@ -54,9 +61,27 @@
</tr>
</xsl:template>
+
+<xsl:template match="echo:content[@type='text/xhtml']">
+<tr>
+ <td><input type="image" src="/lenya/lenya/images/insert.gif" name="<xupdate:insert-before select="/echo:entry/echo:content[@tagID='{@tagID}']"><xupdate:element name="echo:content" namespace="http://purl.org/atom/ns#"><xupdate:attribute name="type">text/xhtml</xupdate:attribute>New content</xupdate:element></xupdate:insert-before>" value="LENYA"/></td>
+ <td colspan="2">Content (text/xhtml)</td>
+</tr>
+<tr>
+ <td valign="top"><input type="image" src="/lenya/lenya/images/delete.gif" name="<xupdate:remove select="/echo:entry/echo:content[@tagID='{@tagID}']"/>" value="true"/></td>
+ <td valign="top">Content (text/xhtml)</td>
+ <td>
+ <textarea name="<xupdate:update select="/echo:entry/echo:content[@tagID='{@tagID}']">" cols="40" rows="5">
+ <xsl:apply-templates select="." mode="mixed"/>
+ </textarea>
+ </td>
+</tr>
+</xsl:template>
+
+
<xsl:template match="echo:content">
<tr>
- <td> </td><td valign="top">Content (<xsl:value-of select="@type"/>)</td><td><xsl:apply-templates/></td>
+ <td> </td><td valign="top">Content (Either no @type attribute or no xsl:template with such a @type attribute!)</td><td><xsl:apply-templates/></td>
</tr>
</xsl:template>
@@ -67,14 +92,21 @@
<xsl:template match="echo:title//*" mode="mixed">
<xsl:copy>
<xsl:copy-of select="@*[local-name()!='tagID']"/>
-<xsl:apply-templates select="node()"/>
+<xsl:apply-templates select="node()" mode="mixed"/>
</xsl:copy>
</xsl:template>
<xsl:template match="echo:summary//*" mode="mixed">
<xsl:copy>
<xsl:copy-of select="@*[local-name()!='tagID']"/>
-<xsl:apply-templates select="node()"/>
+<xsl:apply-templates select="node()" mode="mixed"/>
+</xsl:copy>
+</xsl:template>
+
+<xsl:template match="echo:content//*" mode="mixed">
+<xsl:copy>
+<xsl:copy-of select="@*[local-name()!='tagID']"/>
+<xsl:apply-templates select="node()" mode="mixed"/>
</xsl:copy>
</xsl:template>
1.8 +5 -1 cocoon-lenya/src/webapp/lenya/pubs/blog/xslt/entry/body.xsl
Index: body.xsl
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/blog/xslt/entry/body.xsl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- body.xsl 10 Sep 2003 18:55:08 -0000 1.7
+++ body.xsl 19 Oct 2003 11:16:06 -0000 1.8
@@ -9,12 +9,16 @@
<xsl:template match="echo:entry">
<div class="dateline"><xsl:value-of select="echo:issued"/></div>
<div class="title"><xsl:value-of select="echo:title"/></div>
- <i><xsl:value-of select="echo:summary"/></i>
+ <i><xsl:copy-of select="echo:summary/node()"/></i>
<xsl:apply-templates select="echo:content"/>
<br />
<p class="issued">
<b>Posted by <a href="{echo:author/echo:homepage}"><xsl:value-of select="echo:author/echo:name"/></a> at <xsl:value-of select="echo:issued"/> | <a href="index.html">Permalink</a></b>
</p>
+</xsl:template>
+
+<xsl:template match="echo:content[@type='text/xhtml']">
+ <xsl:copy-of select="node()"/>
</xsl:template>
<xsl:template match="echo:content">
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org