[jboss-svn-commits] JBL Code SVN: r29061 - in labs/jbosslabs/labs-3.0-build/integration/mgnl-modules: jbossorg-wiki and 20 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Aug 26 07:06:39 EDT 2009
Author: jchocholacek
Date: 2009-08-26 07:06:39 -0400 (Wed, 26 Aug 2009)
New Revision: 29061
Added:
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/.classpath
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/.project
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/pom.xml
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/labs/
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/labs/magnolia/
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/labs/magnolia/modules/
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/labs/magnolia/modules/wiki/
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/labs/magnolia/modules/wiki/WikiParagraph.java
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/labs/magnolia/modules/wiki/WikiParagraphRenderer.java
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/labs/magnolia/modules/wiki/parser/
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/labs/magnolia/modules/wiki/parser/Utils.java
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/labs/magnolia/modules/wiki/parser/WikiParser.java
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/META-INF/
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/META-INF/magnolia/
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/META-INF/magnolia/jbossorg-wiki.xml
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/mgnl-bootstrap/
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/mgnl-bootstrap/jbossorg-wiki/
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/mgnl-bootstrap/jbossorg-wiki/config.modules.jbossorg-wiki.dialogs.jbossorg-wiki.xml
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/mgnl-bootstrap/jbossorg-wiki/config.modules.jbossorg-wiki.paragraphs.jbossorg-wiki.xml
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/mgnl-files/
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/mgnl-files/templates/
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/mgnl-files/templates/jbossorg/
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/mgnl-files/templates/jbossorg/paragraphs/
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/mgnl-files/templates/jbossorg/paragraphs/jbossorg-wiki/
labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/mgnl-files/templates/jbossorg/paragraphs/jbossorg-wiki/wiki.jsp
Log:
version 1.0.0-STAGING
Added: labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/.classpath
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/.classpath (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/.classpath 2009-08-26 11:06:39 UTC (rev 29061)
@@ -0,0 +1,96 @@
+<classpath>
+ <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
+ <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+ <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" sourcepath="M2_REPO/javax/activation/activation/1.1/activation-1.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/jcr/jcr/1.0/jcr-1.0.jar" sourcepath="M2_REPO/javax/jcr/jcr/1.0/jcr-1.0-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/jchochol/.m2/repository/javax/jcr/jcr/1.0/jcr-1.0-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/javax/servlet/jstl/1.1.2/jstl-1.1.2.jar" sourcepath="M2_REPO/javax/servlet/jstl/1.1.2/jstl-1.1.2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/mail/mail/1.4/mail-1.4.jar" sourcepath="M2_REPO/javax/mail/mail/1.4/mail-1.4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.4/servlet-api-2.4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar" sourcepath="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/jchochol/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/commons-betwixt/commons-betwixt/0.7/commons-betwixt-0.7.jar" sourcepath="M2_REPO/commons-betwixt/commons-betwixt/0.7/commons-betwixt-0.7-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/jchochol/.m2/repository/commons-betwixt/commons-betwixt/0.7/commons-betwixt-0.7-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/commons-chain/commons-chain/1.1/commons-chain-1.1.jar" sourcepath="M2_REPO/commons-chain/commons-chain/1.1/commons-chain-1.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.3/commons-codec-1.3.jar" sourcepath="M2_REPO/commons-codec/commons-codec/1.3/commons-codec-1.3-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/jchochol/.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.2/commons-collections-3.2.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.2/commons-collections-3.2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-digester/commons-digester/1.6/commons-digester-1.6.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-fileupload/commons-fileupload/1.2/commons-fileupload-1.2.jar" sourcepath="M2_REPO/commons-fileupload/commons-fileupload/1.2/commons-fileupload-1.2-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/jchochol/.m2/repository/commons-fileupload/commons-fileupload/1.2/commons-fileupload-1.2-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/commons-httpclient/commons-httpclient/3.0.1/commons-httpclient-3.0.1.jar" sourcepath="M2_REPO/commons-httpclient/commons-httpclient/3.0.1/commons-httpclient-3.0.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-io/commons-io/1.3/commons-io-1.3.jar" sourcepath="M2_REPO/commons-io/commons-io/1.3/commons-io-1.3-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.3/commons-lang-2.3.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.3/commons-lang-2.3-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-pool/commons-pool/1.3/commons-pool-1.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar" sourcepath="M2_REPO/concurrent/concurrent/1.3.4/concurrent-1.3.4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/servlets/com/cos/05Nov2002/cos-05Nov2002.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/derby/derby/10.2.1.6/derby-10.2.1.6.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/freemarker/freemarker/2.3.10/freemarker-2.3.10.jar" sourcepath="M2_REPO/org/freemarker/freemarker/2.3.10/freemarker-2.3.10-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/jackrabbit/jackrabbit-api/1.4/jackrabbit-api-1.4.jar" sourcepath="M2_REPO/org/apache/jackrabbit/jackrabbit-api/1.4/jackrabbit-api-1.4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/jackrabbit/jackrabbit-core/1.4.5/jackrabbit-core-1.4.5.jar" sourcepath="M2_REPO/org/apache/jackrabbit/jackrabbit-core/1.4.5/jackrabbit-core-1.4.5-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/jackrabbit/jackrabbit-jcr-commons/1.4/jackrabbit-jcr-commons-1.4.jar" sourcepath="M2_REPO/org/apache/jackrabbit/jackrabbit-jcr-commons/1.4/jackrabbit-jcr-commons-1.4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/jackrabbit/jackrabbit-spi/1.4/jackrabbit-spi-1.4.jar" sourcepath="M2_REPO/org/apache/jackrabbit/jackrabbit-spi/1.4/jackrabbit-spi-1.4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/jackrabbit/jackrabbit-spi-commons/1.4/jackrabbit-spi-commons-1.4.jar" sourcepath="M2_REPO/org/apache/jackrabbit/jackrabbit-spi-commons/1.4/jackrabbit-spi-commons-1.4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/jackrabbit/jackrabbit-text-extractors/1.4/jackrabbit-text-extractors-1.4.jar" sourcepath="M2_REPO/org/apache/jackrabbit/jackrabbit-text-extractors/1.4/jackrabbit-text-extractors-1.4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jaxen/jaxen/1.0-FCS/jaxen-1.0-FCS.jar" sourcepath="M2_REPO/jaxen/jaxen/1.0-FCS/jaxen-1.0-FCS-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/jchochol/.m2/repository/jaxen/jaxen/1.0-FCS/jaxen-1.0-FCS-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/jcl104-over-slf4j/1.4.1/jcl104-over-slf4j-1.4.1.jar" sourcepath="M2_REPO/org/slf4j/jcl104-over-slf4j/1.4.1/jcl104-over-slf4j-1.4.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jdom/jdom/1.0/jdom-1.0.jar" sourcepath="M2_REPO/jdom/jdom/1.0/jdom-1.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/safehaus/jug/jug/2.0.0/jug-2.0.0-asl.jar"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.13/log4j-1.2.13.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-core/2.2.0/lucene-core-2.2.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/info/magnolia/magnolia-core/3.6.3/magnolia-core-3.6.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/info/magnolia/magnolia-module-admininterface/3.6.3/magnolia-module-admininterface-3.6.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/nekohtml/nekohtml/0.9.4/nekohtml-0.9.4.jar" sourcepath="M2_REPO/nekohtml/nekohtml/0.9.4/nekohtml-0.9.4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/openwfe/openwfe-applic/1.7.2.1/openwfe-applic-1.7.2.1.jar" sourcepath="M2_REPO/org/openwfe/openwfe-applic/1.7.2.1/openwfe-applic-1.7.2.1-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/jchochol/.m2/repository/org/openwfe/openwfe-applic/1.7.2.1/openwfe-applic-1.7.2.1-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/org/openwfe/openwfe-jcr/1.7.2.1/openwfe-jcr-1.7.2.1.jar" sourcepath="M2_REPO/org/openwfe/openwfe-jcr/1.7.2.1/openwfe-jcr-1.7.2.1-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/jchochol/.m2/repository/org/openwfe/openwfe-jcr/1.7.2.1/openwfe-jcr-1.7.2.1-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/pdfbox/pdfbox/0.6.4/pdfbox-0.6.4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/poi/poi/2.5.1-final-20040804/poi-2.5.1-final-20040804.jar" sourcepath="M2_REPO/poi/poi/2.5.1-final-20040804/poi-2.5.1-final-20040804-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/jchochol/.m2/repository/poi/poi/2.5.1-final-20040804/poi-2.5.1-final-20040804-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/saxpath/saxpath/1.0-FCS/saxpath-1.0-FCS.jar" sourcepath="M2_REPO/saxpath/saxpath/1.0-FCS/saxpath-1.0-FCS-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/jchochol/.m2/repository/saxpath/saxpath/1.0-FCS/saxpath-1.0-FCS-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.4.1/slf4j-api-1.4.1.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.4.1/slf4j-api-1.4.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.4.1/slf4j-log4j12-1.4.1.jar" sourcepath="M2_REPO/org/slf4j/slf4j-log4j12/1.4.1/slf4j-log4j12-1.4.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/taglibs/standard/1.1.2/standard-1.1.2.jar" sourcepath="M2_REPO/taglibs/standard/1.1.2/standard-1.1.2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/textmining/tm-extractors/0.4/tm-extractors-0.4.jar" sourcepath="M2_REPO/org/textmining/tm-extractors/0.4/tm-extractors-0.4-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/jchochol/.m2/repository/org/textmining/tm-extractors/0.4/tm-extractors-0.4-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar" sourcepath="M2_REPO/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1-sources.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+</classpath>
Added: labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/.project
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/.project (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/.project 2009-08-26 11:06:39 UTC (rev 29061)
@@ -0,0 +1,13 @@
+<projectDescription>
+ <name>jbossorg-wiki</name>
+ <comment/>
+ <projects/>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
\ No newline at end of file
Added: labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/pom.xml
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/pom.xml (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/pom.xml 2009-08-26 11:06:39 UTC (rev 29061)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd ">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.labs.magnolia.modules</groupId>
+ <artifactId>jbossorg-wiki</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0.0-SNAPSHOT</version>
+ <name>A custom Magnolia module for JBoss.org community page</name>
+ <url>http://www.jboss.org</url>
+
+ <properties>
+ <magnoliaVersion>3.6.3</magnoliaVersion>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>info.magnolia</groupId>
+ <artifactId>magnolia-core</artifactId>
+ <version>${magnoliaVersion}</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+ <repositories>
+ <repository>
+ <id>magnolia</id>
+ <url>http://svn.magnolia.info/maven/m2</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <!-- enable this if you need magnolia snapshots :
+ <repository>
+ <id>magnolia.snapshots</id>
+ <url>http://svn.magnolia.info/maven/snapshots</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ -->
+ </repositories>
+</project>
Added: labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/labs/magnolia/modules/wiki/WikiParagraph.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/labs/magnolia/modules/wiki/WikiParagraph.java (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/labs/magnolia/modules/wiki/WikiParagraph.java 2009-08-26 11:06:39 UTC (rev 29061)
@@ -0,0 +1,37 @@
+package org.jboss.labs.magnolia.modules.wiki;
+
+import java.util.*;
+
+import info.magnolia.cms.beans.runtime.FileProperties;
+import info.magnolia.cms.core.Content;
+import info.magnolia.cms.core.NodeData;
+import org.jboss.labs.magnolia.modules.wiki.parser.*;
+
+/**
+ * Main class with (static) util methods.
+ *
+ * @author jchochol at redhat.com - JBoss Community Website Team
+ *
+ */
+public class WikiParagraph {
+
+ public static Map<String,String> getAttachmantMap(Content content) {
+ // read all 10 attachments and create map (filename.ext=url)
+ NodeData nd = null;
+ Map<String,String> attachments = new HashMap<String,String>();
+ for (int i=1; i<=10; i++) {
+ nd = content.getNodeData("attachment"+i);
+ if (nd==null) continue; // skip if no attachment with such #
+ String fn = nd.getAttribute(FileProperties.PROPERTY_FILENAME);
+ String ext = nd.getAttribute(FileProperties.PROPERTY_EXTENSION);
+ String filename = fn + "." + ext;
+ String uri = content.getHandle() + "/attachment" + i;
+ attachments.put(filename,uri);
+ }
+ return attachments;
+ }
+
+ public static String getXHTMLfromWiki(String wikiText, Map<String,String> attachments) {
+ return WikiParser.renderXHTML(wikiText,attachments);
+ }
+}
Added: labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/labs/magnolia/modules/wiki/WikiParagraphRenderer.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/labs/magnolia/modules/wiki/WikiParagraphRenderer.java (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/labs/magnolia/modules/wiki/WikiParagraphRenderer.java 2009-08-26 11:06:39 UTC (rev 29061)
@@ -0,0 +1,82 @@
+/**
+ * This file Copyright (c) 2007-2008 Magnolia International
+ * Ltd. (http://www.magnolia.info). All rights reserved.
+ *
+ *
+ * This file is dual-licensed under both the Magnolia
+ * Network Agreement and the GNU General Public License.
+ * You may elect to use one or the other of these licenses.
+ *
+ * This file is distributed in the hope that it will be
+ * useful, but AS-IS and WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE, TITLE, or NONINFRINGEMENT.
+ * Redistribution, except as permitted by whichever of the GPL
+ * or MNA you select, is prohibited.
+ *
+ * 1. For the GPL license (GPL), you can redistribute and/or
+ * modify this file under the terms of the GNU General
+ * Public License, Version 3, as published by the Free Software
+ * Foundation. You should have received a copy of the GNU
+ * General Public License, Version 3 along with this program;
+ * if not, write to the Free Software Foundation, Inc., 51
+ * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * 2. For the Magnolia Network Agreement (MNA), this file
+ * and the accompanying materials are made available under the
+ * terms of the MNA which accompanies this distribution, and
+ * is available at http://www.magnolia.info/mna.html
+ *
+ * Any modifications to this file must keep this entire header
+ * intact.
+ *
+ */
+package org.jboss.labs.magnolia.modules.wiki;
+
+import info.magnolia.cms.beans.config.Paragraph;
+import info.magnolia.cms.beans.runtime.FileProperties;
+import info.magnolia.cms.beans.runtime.ParagraphRenderer;
+import info.magnolia.cms.core.Content;
+import info.magnolia.cms.core.NodeData;
+
+import java.io.IOException;
+import java.io.Writer;
+
+//JBoss.org devel
+import org.jboss.labs.magnolia.modules.wiki.parser.*;
+import java.util.*;
+
+/**
+ *
+ * @author gjoseph
+ * @version $Revision: $ ($Author: $)
+ */
+public class WikiParagraphRenderer implements ParagraphRenderer {
+
+ public WikiParagraphRenderer() {
+ }
+
+ public void render(Content content, Paragraph paragraph, Writer writer) throws IOException {
+ final String wikiText = content.getNodeData("text").getString();
+
+ // read all 10 attachments and create map (filename.ext=url)
+ NodeData nd = null;
+ Map<String,String> attachments = new HashMap<String,String>();
+ for (int i=1; i<=10; i++) {
+ nd = content.getNodeData("attachment"+i);
+ if (nd==null) continue; // skip if no attachment with such #
+ String fn = nd.getAttribute(FileProperties.PROPERTY_FILENAME);
+ String ext = nd.getAttribute(FileProperties.PROPERTY_EXTENSION);
+ String filename = fn + "." + ext;
+ String uri = content.getHandle() + "/attachment" + i;
+ attachments.put(filename,uri);
+ }
+
+ // enclose generated XHTML with <div class="wikimarkup">
+ writer.write("\n<div class=\"wikimarkup\">\n");
+ writer.write(WikiParser.renderXHTML(wikiText,attachments));
+ writer.write("\n</div>\n");
+
+ }
+
+}
Added: labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/labs/magnolia/modules/wiki/parser/Utils.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/labs/magnolia/modules/wiki/parser/Utils.java (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/labs/magnolia/modules/wiki/parser/Utils.java 2009-08-26 11:06:39 UTC (rev 29061)
@@ -0,0 +1,243 @@
+/*
+ * Copyright (c) 2007 Yaroslav Stavnichiy, yarosla at gmail.com
+ *
+ * Latest version of this software can be obtained from:
+ * http://web-tec.info/WikiParser/
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * If you make use of this code, I'd appreciate hearing about it.
+ * Comments, suggestions, and bug reports welcome: yarosla at gmail.com
+ */
+
+package org.jboss.labs.magnolia.modules.wiki.parser;
+
+import java.util.*;
+
+public class Utils {
+
+ public static boolean isUrlChar(char c) {
+ // From MediaWiki: "._\\/~%-+&#?!=()@"
+ // From http://www.ietf.org/rfc/rfc2396.txt :
+ // reserved: ";/?:@&=+$,"
+ // unreserved: "-_.!~*'()"
+ // delim: "%#"
+ if (isLatinLetterOrDigit(c)) return true;
+ return "/?@&=+,-_.!~()%#;:$*".indexOf(c)>=0; // I excluded '\''
+ }
+
+ public static boolean isLatinLetterOrDigit(char c) {
+ return (c>='a' && c<='z') || (c>='A' && c<='Z') || (c>='0' && c<='9');
+ }
+
+ /**
+ * Filters text so there are no '\r' chars in it ("\r\n" -> "\n"; then "\r" -> "\n").
+ * Most importantly makes all blank lines (lines with only spaces) exactly like this: "\n\n".
+ * WikiParser relies on that.
+ *
+ * @param text
+ * @return filtered text
+ */
+ public static String preprocessWikiText(String text) {
+ if (text==null) return "";
+ text=text.trim();
+ int length=text.length();
+ char[] chars=new char[length];
+ text.getChars(0, length, chars, 0);
+ StringBuilder sb=new StringBuilder();
+ boolean blankLine=true;
+ StringBuilder spaces=new StringBuilder();
+ for (int p=0; p<length; p++) {
+ char c=chars[p];
+ if (c=='\r') { // "\r\n" -> "\n"; then "\r" -> "\n"
+ if (p+1<length && chars[p+1]=='\n') p++;
+ sb.append('\n');
+ spaces.delete(0, spaces.length()); // discard spaces if there is nothing else on the line
+ blankLine=true;
+ }
+ else if (c=='\n') {
+ sb.append(c);
+ spaces.delete(0, spaces.length()); // discard spaces if there is nothing else on the line
+ blankLine=true;
+ }
+ else if (blankLine) {
+ if (c<=' '/* && c!='\n'*/) {
+ spaces.append(c);
+ }
+ else {
+ sb.append(spaces);
+ blankLine=false;
+ sb.append(c);
+ }
+ }
+ else {
+ sb.append(c);
+ }
+ }
+ return sb.toString();
+ }
+
+ public static String escapeHTML(String s) {
+ if (s==null) return "";
+ StringBuffer sb=new StringBuffer(s.length()+100);
+ int length=s.length();
+
+ for (int i=0; i<length; i++) {
+ char ch=s.charAt(i);
+
+ if ('<'==ch) {
+ sb.append("<");
+ }
+ else if ('>'==ch) {
+ sb.append(">");
+ }
+ else if ('&'==ch) {
+ sb.append("&");
+ }
+ else if ('\''==ch) {
+ sb.append("'");
+ }
+ else if ('"'==ch) {
+ sb.append(""");
+ }
+ else {
+ sb.append(ch);
+ }
+ }
+ return sb.toString();
+ }
+
+ private static HashMap<String,Character> entities=null;
+
+ private static synchronized HashMap<String,Character> getHtmlEntities() {
+ if (entities==null) {
+ entities=new HashMap<String, Character>();
+ entities.put("lt", '<');
+ entities.put("gt", '>');
+ entities.put("amp", '&');
+ entities.put("quot", '"');
+ entities.put("apos", '\'');
+ entities.put("nbsp", '\u00A0');
+ entities.put("shy", '\u00AD');
+ entities.put("copy", '\u00A9');
+ entities.put("reg", '\u00AE');
+ entities.put("trade", '\u2122');
+ entities.put("mdash", '\u2014');
+ entities.put("ndash", '\u2013');
+ entities.put("ldquo", '\u201C');
+ entities.put("rdquo", '\u201D');
+ entities.put("euro", '\u20AC');
+ entities.put("middot", '\u00B7');
+ entities.put("bull", '\u2022');
+ entities.put("laquo", '\u00AB');
+ entities.put("raquo", '\u00BB');
+ }
+ return entities;
+ }
+
+ public static String unescapeHTML(String value) {
+ if (value==null) return null;
+ if (value.indexOf('&')<0) return value;
+ HashMap<String,Character> ent=getHtmlEntities();
+ StringBuffer sb=new StringBuffer();
+ final int length=value.length();
+ for (int i=0; i<length; i++) {
+ char c=value.charAt(i);
+ if (c=='&') {
+ char ce=0;
+ int i1=value.indexOf(';', i+1);
+ if (i1>i && i1-i<=12) {
+ if (value.charAt(i+1)=='#') {
+ if (value.charAt(i+2)=='x') {
+ ce=(char)atoi(value.substring(i+3), 16);
+ }
+ else {
+ ce=(char)atoi(value.substring(i+2));
+ }
+ }
+ else {
+ synchronized (ent) {
+ Character ceObj=ent.get(value.substring(i+1, i1));
+ ce=ceObj==null?0:ceObj.charValue();
+ }
+ }
+ }
+ if (ce>0) {
+ sb.append(ce);
+ i=i1;
+ }
+ else sb.append(c);
+ }
+ else {
+ sb.append(c);
+ }
+ }
+ return sb.toString();
+ }
+
+ static public int atoi(String s) {
+ try {
+ return Integer.parseInt(s);
+ }
+ catch (Throwable ex) {
+ return 0;
+ }
+ }
+
+ static public int atoi(String s, int base) {
+ try {
+ return Integer.parseInt(s, base);
+ }
+ catch (Throwable ex) {
+ return 0;
+ }
+ }
+
+ public static String replaceString(String str, String from, String to) {
+ StringBuffer buf = new StringBuffer();
+ int flen = from.length();
+ int i1=0, i2=0;
+ while ( (i2 = str.indexOf(from,i1)) >= 0 ) {
+ buf.append(str.substring(i1, i2));
+ buf.append(to);
+ i1 = i2 + flen;
+ }
+ buf.append(str.substring(i1));
+ return buf.toString();
+ }
+
+ public static String[] split(String s, char separator) {
+ // this is meant to be faster than String.split() when separator is not regexp
+ if (s==null) return null;
+ ArrayList<String> parts=new ArrayList<String>();
+ int beginIndex=0, endIndex;
+ while ((endIndex=s.indexOf(separator, beginIndex))>=0) {
+ parts.add(s.substring(beginIndex, endIndex));
+ beginIndex=endIndex+1;
+ }
+ parts.add(s.substring(beginIndex));
+ String[] a=new String[parts.size()];
+ return parts.toArray(a);
+ }
+
+ public static String emptyToNull(String s) { return "".equals(s)?null:s; }
+ public static String noNull(String s) { return s==null?"":s; }
+ public static String noNull(String s, String val) { return s==null?val:s; }
+ public static boolean isEmpty(String s) { return (s == null || s.length() == 0); }
+}
Added: labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/labs/magnolia/modules/wiki/parser/WikiParser.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/labs/magnolia/modules/wiki/parser/WikiParser.java (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/java/org/jboss/labs/magnolia/modules/wiki/parser/WikiParser.java 2009-08-26 11:06:39 UTC (rev 29061)
@@ -0,0 +1,664 @@
+/*
+ * Copyright (c) 2007 Yaroslav Stavnichiy, yarosla at gmail.com
+ *
+ * Latest version of this software can be obtained from:
+ * http://web-tec.info/WikiParser/
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * If you make use of this code, I'd appreciate hearing about it.
+ * Comments, suggestions, and bug reports welcome: yarosla at gmail.com
+ */
+
+package org.jboss.labs.magnolia.modules.wiki.parser;
+
+import static org.jboss.labs.magnolia.modules.wiki.parser.Utils.*;
+import java.net.*;
+import java.util.*; // JBoss.org code
+
+/**
+ * WikiParser.renderXHTML() is the main method of this class.
+ * It takes wiki-text and returns XHTML.
+ *
+ * WikiParser's behavior can be customized by overriding appendXxx() methods,
+ * which should make integration of this class into any wiki/blog/forum software
+ * easy and painless.
+ *
+ * @author Yaroslav Stavnichiy (yarosla at gmail.com)
+ *
+ */
+public class WikiParser {
+
+ private int wikiLength;
+ private char wikiChars[];
+ protected StringBuilder sb=new StringBuilder();
+ private String wikiText;
+ private int pos=0;
+ private int listLevel=-1;
+ private char listLevels[]=new char[6]; // max number of levels allowed
+ private boolean blockquoteBR=false;
+ private boolean inTable=false;
+
+ private static enum ContextType {PARAGRAPH, LIST_ITEM, TABLE_CELL, HEADER, NOWIKI_BLOCK};
+
+ private static final String[] ESCAPED_INLINE_SEQUENCES= {"{{{", "{{", "}}}", "**", "//", "__", "##", "\\\\", "[[", "<<<", "~", "--", "|"};
+
+ private static final String LIST_CHARS="*-#>:";
+ private static final String[] LIST_OPEN= {"<ul><li>", "<ul><li>", "<ol><li>", "<blockquote>", "<div class='indent'>"};
+ private static final String[] LIST_CLOSE= {"</li></ul>\n", "</li></ul>\n", "</li></ol>\n", "</blockquote>\n", "</div>\n"};
+
+ private static final String FORMAT_CHARS="*/_#";
+ private static final String[] FORMAT_DELIM= {"**", "//", "__", "##"};
+ private static final String[] FORMAT_TAG_OPEN= {"<strong>", "<em>", "<span class=\"underline\">", "<tt>"};
+ private static final String[] FORMAT_TAG_CLOSE= {"</strong>", "</em>", "</span>", "</tt>"};
+
+
+ // JBoss.org code START
+ private Map<String,String> images;
+
+ protected WikiParser(String wikiText, Map<String,String> images) {
+ wikiText=preprocessWikiText(wikiText);
+
+ this.images = images;
+
+ this.wikiText=wikiText;
+ wikiLength=this.wikiText.length();
+ wikiChars=new char[wikiLength];
+ this.wikiText.getChars(0, wikiLength, wikiChars, 0);
+
+ while (parseBlock());
+
+ closeListsAndTables();
+ }
+
+ public static String renderXHTML(String wikiText, Map<String,String> images) {
+ return new WikiParser(wikiText,images).toString();
+ }
+
+ // JBoss.org code END
+
+ public static String renderXHTML(String wikiText) {
+ return new WikiParser(wikiText).toString();
+ }
+
+ protected WikiParser(String wikiText) {
+ wikiText=preprocessWikiText(wikiText);
+
+ this.wikiText=wikiText;
+ wikiLength=this.wikiText.length();
+ wikiChars=new char[wikiLength];
+ this.wikiText.getChars(0, wikiLength, wikiChars, 0);
+
+ while (parseBlock());
+
+ closeListsAndTables();
+ }
+
+ public String toString() {
+ return sb.toString();
+ }
+
+ private void closeListsAndTables() {
+ // close unclosed lists
+ while (listLevel>=0) {
+ sb.append(LIST_CLOSE[LIST_CHARS.indexOf(listLevels[listLevel--])]);
+ }
+ if (inTable) {
+ sb.append("</table>\n");
+ inTable=false;
+ }
+ }
+
+ private boolean parseBlock() {
+ for (; pos<wikiLength && wikiChars[pos]<=' ' && wikiChars[pos]!='\n'; pos++) ; // skip whitespace
+ if (pos>=wikiLength) return false;
+
+ char c=wikiChars[pos];
+
+ if (c=='\n') { // blank line => end of list/table; no other meaning
+ closeListsAndTables();
+ pos++;
+ return true;
+ }
+
+ if (c=='|') { // table
+ if (!inTable) {
+ closeListsAndTables(); // close lists if any
+ sb.append("<table border='1'>");
+ inTable=true;
+ }
+ pos=parseTableRow(pos+1);
+ return true;
+ }
+ else {
+ if (inTable) {
+ sb.append("</table>\n");
+ inTable=false;
+ }
+ }
+
+ if (listLevel>=0 || (c=='*' || c=='-' || c=='#' || c=='>' || c==':')) { // lists
+ int lc;
+ // count list level
+ for (lc=0; lc<=listLevel && pos+lc<wikiLength && wikiChars[pos+lc]==listLevels[lc]; lc++) ;
+
+ if (lc<=listLevel) { // end list block(s)
+ do {
+ sb.append(LIST_CLOSE[LIST_CHARS.indexOf(listLevels[listLevel--])]);
+ } while (lc<=listLevel);
+ // list(s) closed => retry from the same position
+ return true;
+ }
+ else {
+ if (pos+lc>=wikiLength) return false;
+ char cc=wikiChars[pos+lc];
+ int listType=LIST_CHARS.indexOf(cc);
+ if (listType>=0 && pos+lc+1<wikiLength && wikiChars[pos+lc+1]!=cc) { // new list block
+ sb.append(LIST_OPEN[listType]);
+ listLevels[++listLevel]=cc;
+ pos=parseListItem(pos+lc+1);
+ return true;
+ }
+ else if (listLevel>=0) { // list item - same level
+ if (listLevels[listLevel]=='>' || listLevels[listLevel]==':') sb.append('\n');
+ else sb.append("</li>\n<li>");
+ pos=parseListItem(pos+lc);
+ return true;
+ }
+ }
+ }
+
+ if (c=='=') { // heading
+ int hc;
+ // count heading level
+ for (hc=1; hc<6 && pos+hc<wikiLength && wikiChars[pos+hc]=='='; hc++) ;
+ if (pos+hc>=wikiLength) return false;
+ int p;
+ for (p=pos+hc; p<wikiLength && (wikiChars[p]==' ' || wikiChars[p]=='\t'); p++) ; // skip spaces
+ sb.append("<h"+hc+">");
+ pos=parseItem(p, wikiText.substring(pos, pos+hc), ContextType.HEADER);
+ sb.append("</h"+hc+">\n");
+ return true;
+ }
+ else if (c=='{') { // nowiki-block?
+ if (pos+3<wikiLength && wikiChars[pos+1]=='{' && wikiChars[pos+2]=='{') {
+ int startNowiki=pos+3;
+ int endNowiki=findEndOfNowiki(startNowiki);
+ int endPos=endNowiki+3;
+ if (wikiText.lastIndexOf('\n', endNowiki)>=startNowiki) { // block <pre>
+ if (wikiChars[startNowiki]=='\n') startNowiki++; // skip the very first '\n'
+ if (wikiChars[endNowiki-1]=='\n') endNowiki--; // omit the very last '\n'
+ sb.append("<pre>");
+ appendNowiki(wikiText.substring(startNowiki, endNowiki));
+ sb.append("</pre>\n");
+ pos=endPos;
+ return true;
+ }
+ // else inline <nowiki> - proceed to regular paragraph handling
+ }
+ }
+ else if (c=='-' && wikiText.startsWith("----", pos)) {
+ int p;
+ for (p=pos+4; p<wikiLength && (wikiChars[p]==' ' || wikiChars[p]=='\t'); p++) ; // skip spaces
+ if (p==wikiLength || wikiChars[p]=='\n') {
+ sb.append("\n<hr/>\n");
+ pos=p;
+ return true;
+ }
+ }
+ else if (c=='~') { // block-level escaping: '*' '-' '#' '>' ':' '|' '='
+ if (pos+1<wikiLength) {
+ char nc=wikiChars[pos+1];
+ if (nc=='>' || nc==':' || nc=='|' || nc=='=') { // can't be inline markup
+ pos++; // skip '~' and proceed to regular paragraph handling
+ c=nc;
+ }
+ else if (nc=='*' || nc=='-' || nc=='#') { // might be inline markup so need to double check
+ char nnc=pos+2<wikiLength? wikiChars[pos+2]:0;
+ if (nnc!=nc) {
+ pos++; // skip '~' and proceed to regular paragraph handling
+ c=nc;
+ }
+ // otherwise escaping will be done at line level
+ }
+ }
+ }
+
+ { // paragraph handling
+ sb.append("<p>");
+ pos=parseItem(pos, null, ContextType.PARAGRAPH);
+ sb.append("</p>\n");
+ return true;
+ }
+ }
+
+ /**
+ * Finds first closing '}}}' for nowiki block or span.
+ * Skips escaped sequences: '~}}}'.
+ *
+ * @param startBlock points to first char after '{{{'
+ * @return position of first '}' in closing '}}}'
+ */
+ private int findEndOfNowiki(int startBlock) {
+ // NOTE: this method could step back one char from startBlock position
+ int endBlock=startBlock-3;
+ do {
+ endBlock=wikiText.indexOf("}}}", endBlock+3);
+ if (endBlock<0) return wikiLength; // no matching '}}}' found
+ while (endBlock+3<wikiLength && wikiChars[endBlock+3]=='}')
+ endBlock++; // shift to end of sequence of more than 3x'}' (eg. '}}}}}')
+ } while (wikiChars[endBlock-1]=='~');
+ return endBlock;
+ }
+
+ /**
+ * Greedy version of findEndOfNowiki().
+ * It finds the last possible closing '}}}' before next opening '{{{'.
+ * Also uses escapes '~{{{' and '~}}}'.
+ *
+ * @param startBlock points to first char after '{{{'
+ * @return position of first '}' in closing '}}}'
+ */
+ @SuppressWarnings("unused")
+ private int findEndOfNowikiGreedy(int startBlock) {
+ // NOTE: this method could step back one char from startBlock position
+ int nextBlock=startBlock-3;
+ do {
+ do {
+ nextBlock=wikiText.indexOf("{{{", nextBlock+3);
+ } while (nextBlock>0 && wikiChars[nextBlock-1]=='~');
+ if (nextBlock<0) nextBlock=wikiLength;
+ int endBlock=wikiText.lastIndexOf("}}}", nextBlock);
+ if (endBlock>=startBlock && wikiChars[endBlock-1]!='~') return endBlock;
+ } while (nextBlock<wikiLength);
+ return wikiLength;
+ }
+
+ /**
+ * @param start points to first char after pipe '|'
+ * @return
+ */
+ private int parseTableRow(int start) {
+ if (start>=wikiLength) return wikiLength;
+
+ sb.append("<tr>");
+ boolean endOfRow=false;
+ do {
+ int colspan=0;
+ while (start+colspan<wikiLength && wikiChars[start+colspan]=='|') colspan++;
+ start+=colspan;
+ colspan++;
+ boolean th=start<wikiLength && wikiChars[start]=='=';
+ start+=(th?1:0);
+ while (start<wikiLength && wikiChars[start]<=' ' && wikiChars[start]!='\n') start++; // trim whitespace from the start
+
+ if (start>=wikiLength || wikiChars[start]=='\n') { // skip last empty column
+ start++; // eat '\n'
+ break;
+ }
+
+ sb.append(th? "<th":"<td");
+ if (colspan>1) sb.append(" colspan=\""+colspan+"\"");
+ sb.append('>');
+ try {
+ parseItemThrow(start, null, ContextType.TABLE_CELL);
+ }
+ catch (EndOfSubContextException e) { // end of cell
+ start=e.position;
+ if (start>=wikiLength) endOfRow=true;
+ else if (wikiChars[start]=='\n') {
+ start++; // eat '\n'
+ endOfRow=true;
+ }
+ }
+ catch (EndOfContextException e) {
+ start=e.position;
+ endOfRow=true;
+ }
+ sb.append(th? "</th>":"</td>");
+ } while (!endOfRow/* && start<wikiLength && wikiChars[start]!='\n'*/);
+ sb.append("</tr>\n");
+ return start;
+ }
+
+ /**
+ * Same as parseItem(); blank line adds <br/><br/>
+ *
+ * @param start
+ */
+ private int parseListItem(int start) {
+ while (start<wikiLength && wikiChars[start]<=' ' && wikiChars[start]!='\n') start++; // skip spaces
+ int end=parseItem(start, null, ContextType.LIST_ITEM);
+ if ((listLevels[listLevel]=='>' || listLevels[listLevel]==':') && wikiText.substring(start, end).trim().length()==0) { // empty line within blockquote/div
+ if (!blockquoteBR) {
+ sb.append("<br/><br/>");
+ blockquoteBR=true;
+ }
+ }
+ else {
+ blockquoteBR=false;
+ }
+ return end;
+ }
+
+ /**
+ * @param p points to first slash in suspected URI (scheme://etc)
+ * @param start points to beginning of parsed item
+ * @param start points to end of parsed item
+ *
+ * @return array of two integer offsets [begin_uri, end_uri] if matched, null otherwise
+ */
+ private int[] checkURI(int p, int start, int end) {
+ if (p>start && wikiChars[p-1]==':') { // "://" found
+ int pb=p-1;
+ while (pb>start && isLatinLetterOrDigit(wikiChars[pb-1])) pb--;
+ int pe=p+2;
+ while (pe<end && isUrlChar(wikiChars[pe])) pe++;
+ URI uri=null;
+ do {
+ while (pe>p+2 && ",.%;".indexOf(wikiChars[pe-1])>=0) pe--; // don't want these chars at the end of URI
+ try { // verify URL syntax
+ uri=new URI(wikiText.substring(pb, pe));
+ }
+ catch (URISyntaxException e) {
+ pe--; // try choping from the end
+ }
+ } while (uri==null && pe>p+2);
+ if (uri!=null && uri.isAbsolute()) {
+ int offs[]= {pb, pe};
+ return offs;
+ }
+ }
+ return null;
+ }
+
+ private int parseItem(int start, String delimiter, ContextType context) {
+ try {
+ return parseItemThrow(start, delimiter, context);
+ }
+ catch (EndOfContextException e) {
+ return e.position;
+ }
+ }
+
+ private int parseItemThrow(int start, String delimiter, ContextType context) throws EndOfContextException {
+ StringBuilder tb=new StringBuilder();
+
+ boolean specialCaseDelimiterHandling="//".equals(delimiter);
+ int p=start;
+ int end=wikiLength;
+
+ try {
+ nextChar: while(true) {
+ if (p>=end) throw new EndOfContextException(end); //break;
+
+ if (delimiter!=null && wikiText.startsWith(delimiter, p)) {
+ if (!specialCaseDelimiterHandling || checkURI(p, start, end)==null) {
+ p+=delimiter.length();
+ return p;
+ }
+ }
+
+ char c=wikiChars[p];
+
+ // context-defined break test
+ if (c=='\n') {
+ if (context==ContextType.HEADER || context==ContextType.TABLE_CELL) {
+ p++;
+ throw new EndOfContextException(p);
+ }
+ if (p+1<end && wikiChars[p+1]=='\n') { // blank line delimits everything
+ p++; // leave one '\n' unparsed so parseBlock() can close all lists
+ throw new EndOfContextException(p);
+ }
+ for (p++; p<end && wikiChars[p]<=' ' && wikiChars[p]!='\n'; p++) ; // skip whitespace
+ if (p>=end) throw new EndOfContextException(p);
+
+ c=wikiChars[p];
+
+ if (LIST_CHARS.indexOf(c)>=0) { // lists
+ if (context==ContextType.LIST_ITEM) throw new EndOfContextException(p);
+ if (p+1<end && wikiChars[p+1]!=c) throw new EndOfContextException(p);
+ // also check for ---- <hr>
+ if (wikiText.startsWith("----", p)) {
+ int pp;
+ for (pp=p+4; pp<end && (wikiChars[pp]==' ' || wikiChars[pp]=='\t'); pp++) ; // skip spaces
+ if (pp==end || wikiChars[pp]=='\n') throw new EndOfContextException(p); // yes, it's <hr>
+ }
+ }
+ else if (c=='=') { // header
+ throw new EndOfContextException(p);
+ }
+ else if (c=='|') { // table
+ throw new EndOfContextException(p);
+ }
+
+ // if none matched add '\n' to text buffer
+ tb.append('\n');
+ // p and c already shifted past the '\n' and whitespace after, so go on
+ }
+ else if (c=='|') {
+ if (context==ContextType.TABLE_CELL) {
+ p++;
+ throw new EndOfSubContextException(p);
+ }
+ }
+
+ int formatType;
+
+ if (c=='{') {
+ if (p+1<end && wikiChars[p+1]=='{') {
+ if (p+2<end && wikiChars[p+2]=='{') { // inline or block <nowiki>
+ appendText(tb.toString()); tb.delete(0, tb.length()); // flush text buffer
+ int startNowiki=p+3;
+ int endNowiki=findEndOfNowiki(startNowiki);
+ p=endNowiki+3;
+ if (wikiText.lastIndexOf('\n', endNowiki)>=startNowiki) { // block <pre>
+ if (wikiChars[startNowiki]=='\n') startNowiki++; // skip the very first '\n'
+ if (wikiChars[endNowiki-1]=='\n') endNowiki--; // omit the very last '\n'
+ sb.append("<pre>");
+ appendNowiki(wikiText.substring(startNowiki, endNowiki));
+ sb.append("</pre>\n");
+ //if (context==ContextType.NOWIKI_BLOCK) return p; // in this context return immediately after nowiki
+ }
+ else { // inline <nowiki>
+ appendNowiki(wikiText.substring(startNowiki, endNowiki));
+ }
+ continue;
+ }
+ else if (p+2<end) { // {{image}}
+ int endImg=wikiText.indexOf("}}", p+2);
+ if (endImg>=0 && endImg<end) {
+ appendText(tb.toString()); tb.delete(0, tb.length()); // flush text buffer
+ appendImage(wikiText.substring(p+2, endImg));
+ p=endImg+2;
+ continue;
+ }
+ }
+ }
+ }
+ else if (c=='[') {
+ if (p+1<end && wikiChars[p+1]=='[') { // [[link]]
+ int endLink=wikiText.indexOf("]]", p+2);
+ if (endLink>=0 && endLink<end) {
+ appendText(tb.toString()); tb.delete(0, tb.length()); // flush text buffer
+ appendLink(wikiText.substring(p+2, endLink));
+ p=endLink+2;
+ continue;
+ }
+ }
+ }
+ else if (c=='\\') {
+ if (p+1<end && wikiChars[p+1]=='\\') { // \\ = <br/>
+ appendText(tb.toString()); tb.delete(0, tb.length()); // flush text buffer
+ sb.append("<br/>");
+ p+=2;
+ continue;
+ }
+ }
+ else if (c=='<') {
+ if (p+1<end && wikiChars[p+1]=='<') {
+ if (p+2<end && wikiChars[p+2]=='<') { // <<<macro>>>
+ int endMacro=wikiText.indexOf(">>>", p+3);
+ if (endMacro>=0 && endMacro<end) {
+ appendText(tb.toString()); tb.delete(0, tb.length()); // flush text buffer
+ appendMacro(wikiText.substring(p+3, endMacro));
+ p=endMacro+3;
+ continue;
+ }
+ }
+ }
+ }
+ else if ((formatType=FORMAT_CHARS.indexOf(c))>=0) {
+ if (p+1<end && wikiChars[p+1]==c) {
+ appendText(tb.toString()); tb.delete(0, tb.length()); // flush text buffer
+ if (c=='/') { // special case for "//" - check if it is part of URL (scheme://etc)
+ int[] uriOffs=checkURI(p, start, end);
+ if (uriOffs!=null) {
+ int pb=uriOffs[0], pe=uriOffs[1];
+ if (pb>start && wikiChars[pb-1]=='~') {
+ sb.delete(sb.length()-(p-pb+1), sb.length()); // roll back URL + tilde
+ sb.append(escapeHTML(wikiText.substring(pb, pe)));
+ }
+ else {
+ sb.delete(sb.length()-(p-pb), sb.length()); // roll back URL
+ appendLink(wikiText.substring(pb, pe));
+ }
+ p=pe;
+ continue;
+ }
+ }
+ sb.append(FORMAT_TAG_OPEN[formatType]);
+ try {
+ p=parseItemThrow(p+2, FORMAT_DELIM[formatType], context);
+ }
+ finally {
+ sb.append(FORMAT_TAG_CLOSE[formatType]);
+ }
+ continue;
+ }
+ }
+ else if (c=='~') { // escape
+ // start line escapes are dealt with in parseBlock()
+ for (String e: ESCAPED_INLINE_SEQUENCES) {
+ if (wikiText.startsWith(e, p+1)) {
+ appendText(tb.toString()); tb.delete(0, tb.length()); // flush text buffer
+ sb.append(e);
+ p+=1+e.length();
+ continue nextChar;
+ }
+ }
+ }
+ else if (c=='-') { // ' -- ' => –
+ if (p+2<end && wikiChars[p+1]=='-' && wikiChars[p+2]==' ' && p>start && wikiChars[p-1]==' ') {
+ appendText(tb.toString()); tb.delete(0, tb.length()); // flush text buffer
+ sb.append("– ");
+ p+=3;
+ continue;
+ }
+ }
+ tb.append(c);
+ p++;
+ }
+ }
+ finally {
+ appendText(tb.toString()); tb.delete(0, tb.length()); // flush text buffer
+ }
+ }
+
+
+ protected void appendMacro(String text) {
+ sb.append("<<<Macro:");
+ sb.append(escapeHTML(unescapeHTML(text)));
+ sb.append(">>>");
+ }
+
+ protected void appendLink(String text) {
+ String[] link=split(text, '|');
+ URI uri=null;
+ try { // validate URI
+ uri=new URI(link[0].trim());
+ }
+ catch (URISyntaxException e) {
+ }
+ if (uri!=null && uri.isAbsolute()) {
+ sb.append("<a href=\""+escapeHTML(uri.toString())+"\" rel=\"nofollow\">");
+ sb.append(escapeHTML(unescapeHTML(link.length>=2 && !isEmpty(link[1].trim())? link[1]:link[0])));
+ sb.append("</a>");
+ }
+ else {
+ // JBoss.org code starts here
+ // sb.append("<a href=\"#\" title=\"Internal link\">");
+ sb.append("<a href=\"");
+ sb.append(link[0]);
+ sb.append("\" title=\"Internal link\">");
+ // JBoss.org code ends here
+ sb.append(escapeHTML(unescapeHTML(link.length>=2 && !isEmpty(link[1].trim())? link[1]:link[0])));
+ sb.append("</a>");
+ }
+ }
+
+ protected void appendImage(String text) {
+ String[] link=split(text, '|');
+ URI uri=null;
+ try { // validate URI
+ uri=new URI(link[0].trim());
+ }
+ catch (URISyntaxException e) {
+ }
+ if (uri!=null) {
+ String alt=escapeHTML(unescapeHTML(link.length>=2 && !isEmpty(link[1].trim())? link[1]:link[0]));
+ if (uri.isAbsolute()) {
+ sb.append("<img src=\""+escapeHTML(uri.toString())+"\" alt=\""+alt+"\" title=\""+alt+"\" />");
+ } else {
+ if (images.containsKey(uri.toString())) {
+ sb.append("<img src=\""+escapeHTML(images.get(uri.toString()))+"\" alt=\""+alt+"\" title=\""+alt+"\" />");
+ } else {
+ sb.append("<<<Internal image(?): ");
+ sb.append(escapeHTML(unescapeHTML(text)));
+ sb.append(">>>");
+ }
+ }
+ }
+ }
+
+ protected void appendText(String text) {
+ sb.append(escapeHTML(unescapeHTML(text)));
+ }
+
+ protected void appendNowiki(String text) {
+ sb.append(escapeHTML(replaceString(replaceString(text, "~{{{", "{{{"), "~}}}", "}}}")));
+ }
+
+ private static class EndOfContextException extends Exception {
+ private static final long serialVersionUID=1L;
+ int position;
+ public EndOfContextException(int position) {
+ super();
+ this.position=position;
+ }
+ }
+
+ private static class EndOfSubContextException extends EndOfContextException {
+ private static final long serialVersionUID=1L;
+ public EndOfSubContextException(int position) {
+ super(position);
+ }
+ }
+}
Added: labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/META-INF/magnolia/jbossorg-wiki.xml
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/META-INF/magnolia/jbossorg-wiki.xml (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/META-INF/magnolia/jbossorg-wiki.xml 2009-08-26 11:06:39 UTC (rev 29061)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE module SYSTEM "module.dtd">
+<module>
+ <name>jbossorg-wiki</name>
+ <displayName>JBoss.org Wiki module</displayName>
+ <description>Wiki markup Magnolia module for JBoss.org site</description>
+ <version>1.0.0-SNAPSHOT</version>
+ <dependencies>
+ <dependency>
+ <name>core</name>
+ <version>3.5/*</version>
+ </dependency>
+ <dependency>
+ <name>templating</name>
+ <version>3.5/*</version>
+ </dependency>
+ </dependencies>
+</module>
Added: labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/mgnl-bootstrap/jbossorg-wiki/config.modules.jbossorg-wiki.dialogs.jbossorg-wiki.xml
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/mgnl-bootstrap/jbossorg-wiki/config.modules.jbossorg-wiki.dialogs.jbossorg-wiki.xml (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/mgnl-bootstrap/jbossorg-wiki/config.modules.jbossorg-wiki.dialogs.jbossorg-wiki.xml 2009-08-26 11:06:39 UTC (rev 29061)
@@ -0,0 +1,963 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sv:node sv:name="jbossorg-wiki" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:mgnl="http://www.magnolia.info/jcr/mgnl"
+ xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:rep="internal" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
+ xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:_pre="http://jboss.org"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn_old="http://www.w3.org/2004/10/xpath-functions"
+ xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:jcrfn="http://www.jcp.org/jcr/xpath-functions/1.0">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:content</sv:value>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>Wiki markup</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:Data" sv:type="String">
+ <sv:value>MetaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="String">
+ <sv:value>2004-11-02T15:34:42.832+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2007-12-18T13:51:08.264+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2007-12-18T13:51:08.278+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:title" sv:type="String">
+ <sv:value/>
+ </sv:property>
+ </sv:node>
+ <sv:node sv:name="tabText">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>tab</sv:value>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>Content</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:Data" sv:type="String">
+ <sv:value>MetaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="String">
+ <sv:value>2004-11-02T15:34:42.978+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2007-12-18T13:51:08.265+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2007-12-20T15:28:01.671+01:00</sv:value>
+ </sv:property>
+ </sv:node>
+ <sv:node sv:name="text">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>edit</sv:value>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>Wiki markup</sv:value>
+ </sv:property>
+ <sv:property sv:name="rows" sv:type="String">
+ <sv:value>28</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:Data" sv:type="String">
+ <sv:value>MetaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="String">
+ <sv:value>2004-11-02T15:34:43.087+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2007-12-18T13:51:26.734+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2009-08-20T13:58:53.671+02:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ <sv:node sv:name="cheatSheet">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:mixinTypes" sv:type="Name">
+ <sv:value>mix:lockable</sv:value>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>Help on Wiki markup</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>static</sv:value>
+ </sv:property>
+ <sv:property sv:name="line" sv:type="String">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="value" sv:type="String">
+ <sv:value>
+ <img src='http://www.wikicreole.org/attach/CheatSheet/creole_cheat_sheet.png' alt='Wiki markup cheat sheet' />
+ </sv:value>
+ </sv:property>
+ <sv:property sv:name="type" sv:type="String">
+ <sv:value>String</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="Date">
+ <sv:value>2009-08-20T13:45:10.230+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2009-08-20T14:00:25.752+02:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ </sv:node>
+ <sv:node sv:name="tabAttachments">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:mixinTypes" sv:type="Name">
+ <sv:value>mix:lockable</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>tab</sv:value>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>Attachments</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="Date">
+ <sv:value>2007-12-20T15:28:08.260+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2007-12-20T15:28:35.329+01:00</sv:value>
+ </sv:property>
+ </sv:node>
+ <sv:node sv:name="attachment1">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>file</sv:value>
+ </sv:property>
+ <sv:property sv:name="description" sv:type="String">
+ <sv:value/>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>Attachment #1</sv:value>
+ </sv:property>
+ <sv:property sv:name="type" sv:type="String">
+ <sv:value>Binary</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:Data" sv:type="String">
+ <sv:value>MetaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="String">
+ <sv:value>2004-11-02T15:34:29.357+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2006-05-01T21:48:07.894+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2007-12-20T15:30:02.573+01:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ <sv:node sv:name="attachment2">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>file</sv:value>
+ </sv:property>
+ <sv:property sv:name="description" sv:type="String">
+ <sv:value/>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>Attachment #2</sv:value>
+ </sv:property>
+ <sv:property sv:name="type" sv:type="String">
+ <sv:value>Binary</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:Data" sv:type="String">
+ <sv:value>MetaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="String">
+ <sv:value>2004-11-02T15:34:29.357+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2006-05-01T21:48:07.894+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2007-12-20T15:29:52.405+01:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ <sv:node sv:name="attachment3">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>file</sv:value>
+ </sv:property>
+ <sv:property sv:name="description" sv:type="String">
+ <sv:value/>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>Attachment #3</sv:value>
+ </sv:property>
+ <sv:property sv:name="type" sv:type="String">
+ <sv:value>Binary</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:Data" sv:type="String">
+ <sv:value>MetaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="String">
+ <sv:value>2004-11-02T15:34:29.357+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2006-05-01T21:48:07.894+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2007-12-20T15:29:59.186+01:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ <sv:node sv:name="attachment4">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>file</sv:value>
+ </sv:property>
+ <sv:property sv:name="description" sv:type="String">
+ <sv:value/>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>Attachment #4</sv:value>
+ </sv:property>
+ <sv:property sv:name="type" sv:type="String">
+ <sv:value>Binary</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:Data" sv:type="String">
+ <sv:value>MetaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="String">
+ <sv:value>2004-11-02T15:34:29.357+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2006-05-01T21:48:07.894+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2007-12-20T15:30:50.886+01:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ <sv:node sv:name="attachment5">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>file</sv:value>
+ </sv:property>
+ <sv:property sv:name="description" sv:type="String">
+ <sv:value/>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>Attachment #5</sv:value>
+ </sv:property>
+ <sv:property sv:name="type" sv:type="String">
+ <sv:value>Binary</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:Data" sv:type="String">
+ <sv:value>MetaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="String">
+ <sv:value>2004-11-02T15:34:29.357+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2006-05-01T21:48:07.894+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2007-12-20T15:30:48.390+01:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ <sv:node sv:name="attachment6">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>file</sv:value>
+ </sv:property>
+ <sv:property sv:name="description" sv:type="String">
+ <sv:value/>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>Attachment #6</sv:value>
+ </sv:property>
+ <sv:property sv:name="type" sv:type="String">
+ <sv:value>Binary</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:Data" sv:type="String">
+ <sv:value>MetaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="String">
+ <sv:value>2004-11-02T15:34:29.357+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2006-05-01T21:48:07.894+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2007-12-20T15:30:53.759+01:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ <sv:node sv:name="attachment7">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>file</sv:value>
+ </sv:property>
+ <sv:property sv:name="description" sv:type="String">
+ <sv:value/>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>Attachment #7</sv:value>
+ </sv:property>
+ <sv:property sv:name="type" sv:type="String">
+ <sv:value>Binary</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:Data" sv:type="String">
+ <sv:value>MetaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="String">
+ <sv:value>2004-11-02T15:34:29.357+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2006-05-01T21:48:07.894+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2007-12-20T15:31:00.076+01:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ <sv:node sv:name="attachment8">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>file</sv:value>
+ </sv:property>
+ <sv:property sv:name="description" sv:type="String">
+ <sv:value/>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>Attachment #8</sv:value>
+ </sv:property>
+ <sv:property sv:name="type" sv:type="String">
+ <sv:value>Binary</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:Data" sv:type="String">
+ <sv:value>MetaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="String">
+ <sv:value>2004-11-02T15:34:29.357+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2006-05-01T21:48:07.894+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2007-12-20T15:31:02.318+01:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ <sv:node sv:name="attachment9">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>file</sv:value>
+ </sv:property>
+ <sv:property sv:name="description" sv:type="String">
+ <sv:value/>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>Attachment #9</sv:value>
+ </sv:property>
+ <sv:property sv:name="type" sv:type="String">
+ <sv:value>Binary</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:Data" sv:type="String">
+ <sv:value>MetaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="String">
+ <sv:value>2004-11-02T15:34:29.357+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2006-05-01T21:48:07.894+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2007-12-20T15:31:04.894+01:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ <sv:node sv:name="attachment10">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>file</sv:value>
+ </sv:property>
+ <sv:property sv:name="description" sv:type="String">
+ <sv:value/>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>Attachment #10</sv:value>
+ </sv:property>
+ <sv:property sv:name="type" sv:type="String">
+ <sv:value>Binary</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:Data" sv:type="String">
+ <sv:value>MetaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="String">
+ <sv:value>2004-11-02T15:34:29.357+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2006-05-01T21:48:07.894+02:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2007-12-20T15:31:07.262+01:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ </sv:node>
+
+<sv:node sv:name="tabProps">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>tab</sv:value>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>Properties</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:Data" sv:type="String">
+ <sv:value>MetaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>true</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="String">
+ <sv:value>2004-11-03T08:47:58.474+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2009-04-29T09:44:47.708-04:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2008-07-28T18:36:47.366+02:00</sv:value>
+ </sv:property>
+ </sv:node>
+ <sv:node sv:name="spacer">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>select</sv:value>
+ </sv:property>
+ <sv:property sv:name="description" sv:type="String">
+ <sv:value>dialogs.standard.tabProps.spacer.description</sv:value>
+ </sv:property>
+ <sv:property sv:name="i18nBasename" sv:type="String">
+ <sv:value>ch.esense.module.sitedesigner.messages</sv:value>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>dialogs.standard.tabProps.spacer.label</sv:value>
+ </sv:property>
+ <sv:property sv:name="name" sv:type="String">
+ <sv:value>spacer</sv:value>
+ </sv:property>
+ <sv:property sv:name="type" sv:type="String">
+ <sv:value>Long</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:Data" sv:type="String">
+ <sv:value>MetaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>true</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="String">
+ <sv:value>2004-11-03T08:48:09.632+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2009-04-29T09:44:47.709-04:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2006-03-20T16:10:48.895+01:00</sv:value>
+ </sv:property>
+ </sv:node>
+ <sv:node sv:name="options">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:Data" sv:type="String">
+ <sv:value>MetaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>true</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="String">
+ <sv:value>2004-11-03T08:52:04.490+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2009-04-29T09:44:47.709-04:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="String">
+ <sv:value>2004-11-03T08:52:04.498+01:00</sv:value>
+ </sv:property>
+ </sv:node>
+ <sv:node sv:name="no">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>dialogs.standard.tabProps.spacer.options.no.label</sv:value>
+ </sv:property>
+ <sv:property sv:name="value" sv:type="String">
+ <sv:value>0</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:Data" sv:type="String">
+ <sv:value>MetaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>true</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="String">
+ <sv:value>2004-11-03T08:53:21.660+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2009-04-29T09:44:47.710-04:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2006-03-20T16:04:32.884+01:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ <sv:node sv:name="single">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>dialogs.standard.tabProps.spacer.options.single.label</sv:value>
+ </sv:property>
+ <sv:property sv:name="selected" sv:type="String">
+ <sv:value>true</sv:value>
+ </sv:property>
+ <sv:property sv:name="value" sv:type="String">
+ <sv:value>1</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:Data" sv:type="String">
+ <sv:value>MetaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>true</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="String">
+ <sv:value>2004-11-03T08:53:21.660+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2009-04-29T09:44:47.710-04:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2006-03-20T16:04:41.216+01:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ <sv:node sv:name="double">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>dialogs.standard.tabProps.spacer.options.double.label</sv:value>
+ </sv:property>
+ <sv:property sv:name="selected" sv:type="String">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="value" sv:type="String">
+ <sv:value>2</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:Data" sv:type="String">
+ <sv:value>MetaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>true</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="String">
+ <sv:value>2004-11-03T08:53:21.660+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2009-04-29T09:44:47.711-04:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2006-03-20T16:04:48.096+01:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ </sv:node>
+ </sv:node>
+ <sv:node sv:name="lineAbove">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="buttonLabel" sv:type="String">
+ <sv:value>dialogs.standard.tabProps.lineAbove.buttonLabel</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>checkboxSwitch</sv:value>
+ </sv:property>
+ <sv:property sv:name="description" sv:type="String">
+ <sv:value>dialogs.standard.tabProps.lineAbove.description</sv:value>
+ </sv:property>
+ <sv:property sv:name="i18nBasename" sv:type="String">
+ <sv:value>ch.esense.module.sitedesigner.messages</sv:value>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>dialogs.standard.tabProps.lineAbove.label</sv:value>
+ </sv:property>
+ <sv:property sv:name="name" sv:type="String">
+ <sv:value>lineAbove</sv:value>
+ </sv:property>
+ <sv:property sv:name="selected" sv:type="String">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="type" sv:type="String">
+ <sv:value>Boolean</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:Data" sv:type="String">
+ <sv:value>MetaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>true</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="String">
+ <sv:value>2004-11-03T08:48:09.632+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2009-04-29T09:44:47.711-04:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2006-03-20T16:10:24.529+01:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+ <sv:node sv:name="inherit">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="buttonLabel" sv:type="String">
+ <sv:value>dialogs.standard.tabProps.inherit.buttonLabel</sv:value>
+ </sv:property>
+ <sv:property sv:name="controlType" sv:type="String">
+ <sv:value>checkboxSwitch</sv:value>
+ </sv:property>
+ <sv:property sv:name="description" sv:type="String">
+ <sv:value>dialogs.standard.tabProps.inherit.description</sv:value>
+ </sv:property>
+ <sv:property sv:name="i18nBasename" sv:type="String">
+ <sv:value>ch.esense.module.sitedesigner.messages</sv:value>
+ </sv:property>
+ <sv:property sv:name="label" sv:type="String">
+ <sv:value>dialogs.standard.tabProps.inherit.label</sv:value>
+ </sv:property>
+ <sv:property sv:name="name" sv:type="String">
+ <sv:value>inherit</sv:value>
+ </sv:property>
+ <sv:property sv:name="selected" sv:type="String">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="type" sv:type="String">
+ <sv:value>Boolean</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:Data" sv:type="String">
+ <sv:value>MetaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>true</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="String">
+ <sv:value>2004-11-03T08:48:09.632+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2009-04-29T09:44:47.712-04:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2006-09-04T13:45:22.431+02:00</sv:value>
+ </sv:property>
+ </sv:node>
+ </sv:node>
+</sv:node>
+
+
+</sv:node>
Added: labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/mgnl-bootstrap/jbossorg-wiki/config.modules.jbossorg-wiki.paragraphs.jbossorg-wiki.xml
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/mgnl-bootstrap/jbossorg-wiki/config.modules.jbossorg-wiki.paragraphs.jbossorg-wiki.xml (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/mgnl-bootstrap/jbossorg-wiki/config.modules.jbossorg-wiki.paragraphs.jbossorg-wiki.xml 2009-08-26 11:06:39 UTC (rev 29061)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sv:node sv:name="jbossorg-wiki" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:mgnl="http://www.magnolia.info/jcr/mgnl"
+ xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:rep="internal" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
+ xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:fn_old="http://www.w3.org/2004/10/xpath-functions" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:jcrfn="http://www.jcp.org/jcr/xpath-functions/1.0">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:mixinTypes" sv:type="Name">
+ <sv:value>mix:versionable</sv:value>
+ <sv:value>mix:lockable</sv:value>
+ </sv:property>
+ <sv:property sv:name="type" sv:type="String">
+ <sv:value>jsp</sv:value>
+ </sv:property>
+ <sv:property sv:name="dialog" sv:type="String">
+ <sv:value>jbossorg-wiki</sv:value>
+ </sv:property>
+ <sv:property sv:name="description" sv:type="String">
+ <sv:value>A paragraph rendering wiki markup</sv:value>
+ </sv:property>
+ <sv:property sv:name="showInNewParagraphList" sv:type="String">
+ <sv:value>true</sv:value>
+ </sv:property>
+ <sv:property sv:name="templatePath" sv:type="String">
+ <sv:value>/templates/jbossorg/paragraphs/jbossorg-wiki/wiki.jsp</sv:value>
+ </sv:property>
+ <sv:property sv:name="title" sv:type="String">
+ <sv:value>JBoss.org - Wiki markup</sv:value>
+ </sv:property>
+ <sv:node sv:name="MetaData">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:metaData</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:authorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:creationdate" sv:type="Date">
+ <sv:value>2007-12-18T13:49:44.536+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastmodified" sv:type="Date">
+ <sv:value>2007-12-18T13:50:50.152+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activated" sv:type="Boolean">
+ <sv:value>false</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:lastaction" sv:type="Date">
+ <sv:value>2007-12-18T13:49:48.101+01:00</sv:value>
+ </sv:property>
+ <sv:property sv:name="mgnl:activatorid" sv:type="String">
+ <sv:value>superuser</sv:value>
+ </sv:property>
+ </sv:node>
+</sv:node>
Added: labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/mgnl-files/templates/jbossorg/paragraphs/jbossorg-wiki/wiki.jsp
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/mgnl-files/templates/jbossorg/paragraphs/jbossorg-wiki/wiki.jsp (rev 0)
+++ labs/jbosslabs/labs-3.0-build/integration/mgnl-modules/jbossorg-wiki/src/main/resources/mgnl-files/templates/jbossorg/paragraphs/jbossorg-wiki/wiki.jsp 2009-08-26 11:06:39 UTC (rev 29061)
@@ -0,0 +1,56 @@
+<jsp:root version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:cms="cms-taglib"
+ xmlns:cmsu="cms-util-taglib"
+ xmlns:c="http://java.sun.com/jsp/jstl/core"
+ xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
+ xmlns:cmsfn="http://www.magnolia.info/tlds/cmsfn-taglib.tld">
+
+<jsp:directive.page import="info.magnolia.cms.core.*" />
+<jsp:directive.page import="java.util.*" />
+<jsp:directive.page import="info.magnolia.cms.util.*" />
+<jsp:directive.page import="info.magnolia.module.dms.beans.*" />
+<jsp:directive.page import="info.magnolia.context.*" />
+<jsp:directive.page import="org.apache.commons.lang.*" />
+<jsp:directive.page import="info.magnolia.cms.core.*" />
+<jsp:directive.page import="org.devlib.schmidt.imageinfo.*" />
+<jsp:directive.page import="org.jboss.labs.magnolia.modules.wiki.*" />
+<jsp:directive.page import="org.jboss.labs.magnolia.modules.wiki.parser.*" />
+
+<fmt:setBundle basename="ch.esense.module.sitedesigner.messages" />
+
+<c:choose>
+
+ <c:when test="${rssRequest == 'true'}"></c:when>
+
+ <c:otherwise>
+
+ <c:set var="spacer"><cms:out nodeDataName="spacer"/></c:set>
+ <c:set var="lineAbove"><cms:out nodeDataName="lineAbove"/></c:set>
+
+ <c:if test="${lineAbove=='true'}">
+ <c:import url="/templates/jbossorg/global/lineAbove.jsp" />
+ </c:if>
+
+<jsp:scriptlet>
+<![CDATA[
+ Content activePage = Resource.getLocalContentNode();
+ Map<String,String> attachments = WikiParagraph.getAttachmantMap(activePage);
+ String wikiText = activePage.getNodeData("text").getString();
+ String xhtml = WikiParagraph.getXHTMLfromWiki(wikiText,attachments);
+ pageContext.setAttribute("xhtml",xhtml);
+]]>
+</jsp:scriptlet>
+
+ <div class="wikimarkup">
+ ${xhtml}
+ </div>
+
+ <c:import url="/templates/jbossorg/global/spacer.jsp">
+ <c:param name="spacer">${spacer}</c:param>
+ </c:import>
+
+ </c:otherwise>
+
+</c:choose>
+
+</jsp:root>
\ No newline at end of file
More information about the jboss-svn-commits
mailing list