Author: fred
Date: 2007-08-13 13:58:38 +0000 (Mon, 13 Aug 2007)
New Revision: 14643

Modified:
   trunk/plugins/Echo/build.xml
   trunk/plugins/Echo/src/plugins/echo/Echo.java
   trunk/plugins/Echo/src/plugins/echo/Node.java
   trunk/plugins/Echo/src/plugins/echo/SiteGenerator.java
   trunk/plugins/Echo/src/xml/edit.xsl
   trunk/plugins/Echo/src/xml/test.xsl
Log:
Echo has now it's own wiki markup render !


Modified: trunk/plugins/Echo/build.xml
===================================================================
--- trunk/plugins/Echo/build.xml        2007-08-13 12:10:35 UTC (rev 14642)
+++ trunk/plugins/Echo/build.xml        2007-08-13 13:58:38 UTC (rev 14643)
@@ -15,16 +15,6 @@
        <fail unless="xom_available" status="1"
        message="You need to download xom-1.2b2.jar from 
http://www.xom.nu/unstable.html and to put it in lib/" />

-       <property name="radeox.location" value="${lib.dir}/radeox.jar" />
-       <available file="${radeox.location}" property="radeox_available" />
-       <fail unless="radeox_available" status="1"
-       message="You need to download radeox.jar from 
http://fred.rec.free.fr/lib/ and to put it in lib/" />
-
-       <property name="commons-logging.location" 
value="${lib.dir}/commons-logging.jar" />
-       <available file="${commons-logging.location}" 
property="commons-logging_available" />
-       <fail unless="commons-logging_available" status="1"
-       message="You need to download commons-logging.jar from 
http://fred.rec.free.fr/lib/ and to put it in lib/" />
-       
        <target name="init">
                <tstamp/>
                <mkdir dir="${build.dir}"/>
@@ -33,7 +23,6 @@
                <mkdir dir="${dist.dir}"/>
                <mkdir dir="${javadoc.dir}"/>
        </target>
-

        <target name="compile" depends="init">

@@ -69,8 +58,6 @@
                        </manifest>

                        <ZipFileSet src="${xom.location}"/>
-                       <ZipFileSet src="${radeox.location}"/>
-                       <ZipFileSet src="${commons-logging.location}"/>
                </jar>
        </target>


Modified: trunk/plugins/Echo/src/plugins/echo/Echo.java
===================================================================
--- trunk/plugins/Echo/src/plugins/echo/Echo.java       2007-08-13 12:10:35 UTC 
(rev 14642)
+++ trunk/plugins/Echo/src/plugins/echo/Echo.java       2007-08-13 13:58:38 UTC 
(rev 14643)
@@ -105,11 +105,11 @@
        private String transform(Page page) {
                try {

-//                     return 
transform.transform(page.getDoc()).get(0).toXML();
+                       return 
transform.transform(page.getDoc()).get(0).toXML();

                        /*
                                Nice but input white space are not respected
-                       */
+                       
                        ByteArrayOutputStream baos = new 
ByteArrayOutputStream();
                        Serializer serializer = new Serializer(baos);
                        serializer.setIndent(4);
@@ -117,9 +117,9 @@
                        serializer.write(new Document((Element) 
transform.transform(page.getDoc()).get(0)));
                        return baos.toString();

+                       */


-                       
                } catch (Exception e) {
                        return e.getMessage();
                }

Modified: trunk/plugins/Echo/src/plugins/echo/Node.java
===================================================================
--- trunk/plugins/Echo/src/plugins/echo/Node.java       2007-08-13 12:10:35 UTC 
(rev 14642)
+++ trunk/plugins/Echo/src/plugins/echo/Node.java       2007-08-13 13:58:38 UTC 
(rev 14643)
@@ -230,13 +230,9 @@
        public Node render() {

                Node renderedNode = (Node) this.copy();
-               Element content = renderedNode.getContentElement();
-               MarkupRender markupRender = new MarkupRender();
+               WikiMarkupRender render = new WikiMarkupRender();

-               nu.xom.Nodes renderedContent = 
markupRender.render(content.getChild(0).toXML());
-               content.removeChildren();
-               for(int i=0; i < renderedContent.size(); i++)
-                       content.appendChild(renderedContent.get(i));
+               render.render(renderedNode.getContentElement());

                return renderedNode;


Modified: trunk/plugins/Echo/src/plugins/echo/SiteGenerator.java
===================================================================
--- trunk/plugins/Echo/src/plugins/echo/SiteGenerator.java      2007-08-13 
12:10:35 UTC (rev 14642)
+++ trunk/plugins/Echo/src/plugins/echo/SiteGenerator.java      2007-08-13 
13:58:38 UTC (rev 14643)
@@ -53,7 +53,7 @@
                        System.out.println(node.getId());
                        
writeToFile(transform.transform(node.render().getDoc()), node.getId() + 
".html");
                }
-               
+               /*
                Nodes posts = nodes.getPosts();
                posts.sortByCreationDate();

@@ -78,7 +78,7 @@
                                        
index.appendChild(post.render().getRoot());
                        }
                        writeToFile(transform.transform(new Document(index)), 
"category-" + category + ".html");
-               }
+               }*/

        }
 }
\ No newline at end of file

Modified: trunk/plugins/Echo/src/xml/edit.xsl
===================================================================
--- trunk/plugins/Echo/src/xml/edit.xsl 2007-08-13 12:10:35 UTC (rev 14642)
+++ trunk/plugins/Echo/src/xml/edit.xsl 2007-08-13 13:58:38 UTC (rev 14643)
@@ -216,9 +216,7 @@
                                <textarea id="edit-body" name="body" cols="60" 
rows="20">
                                        <xsl:choose>
                                                <xsl:when 
test="node/content/text()">
-                                                       <xsl:text>
-                                                               <xsl:value-of 
select="node/content" />
-                                                       </xsl:text>
+                                                       <xsl:text><xsl:value-of 
select="node/content" /></xsl:text>
                                                </xsl:when>
                                                <xsl:otherwise>
                                                        <xsl:text> </xsl:text>

Modified: trunk/plugins/Echo/src/xml/test.xsl
===================================================================
--- trunk/plugins/Echo/src/xml/test.xsl 2007-08-13 12:10:35 UTC (rev 14642)
+++ trunk/plugins/Echo/src/xml/test.xsl 2007-08-13 13:58:38 UTC (rev 14643)
@@ -29,22 +29,22 @@
                                                <h1 id="blog-title"><a 
href="index.html">My Flog</a></h1>
                                        </div>

-                                       <div id="left">
+                                       <!--<div id="left">
                                        <xsl:call-template name="blocks">
                                                <xsl:with-param 
name="align">left</xsl:with-param>
                                        </xsl:call-template>
-                                       </div>
+                                       </div>-->

                                        <div id="main">
                                                <h2><xsl:call-template 
name="page-title" /></h2>
                                                <xsl:call-template 
name="content" />
                                        </div>

-                                       <div id="right">
+                                       <!--<div id="right">
                                        <xsl:call-template name="blocks">
                                                <xsl:with-param 
name="align">right</xsl:with-param>
                                        </xsl:call-template>
-                                       </div>
+                                       </div>-->

                                        <div id="footer">
                                                Powered by Echo
@@ -57,10 +57,10 @@
        <xsl:template name="blocks">
                <xsl:param name="align" />

-               <xsl:for-each 
select="document(concat($blocksdir,'blocks.xml'))//block[@align=$align]">
+               <!--<xsl:for-each 
select="document(concat($blocksdir,'blocks.xml'))//block[@align=$align]">
                        <xsl:sort order="ascending" select ="@order" />
                        <xsl:apply-templates 
select="document(concat($blocksdir, @id, '.xml'))/block" />
-               </xsl:for-each>
+               </xsl:for-each>-->
        </xsl:template>

        <xsl:template match="block">


Reply via email to