cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@cocoon.apache.org
Subject [Cocoon Wiki] Updated: WyonaBitfluxEditor
Date Sat, 10 Jul 2004 00:52:40 GMT
   Date: 2004-07-09T17:52:40
   Editor: JoergHeinicke <joerg.heinicke@gmx.de>
   Wiki: Cocoon Wiki
   Page: WyonaBitfluxEditor
   URL: http://wiki.apache.org/cocoon/WyonaBitfluxEditor

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -9,14 +9,14 @@
 			<anchor id="one"/>
 			<section><title>1. Adapting the sitemap (bitflux.xmap)</title>
 				<p>First thing is to add matchers for all files that are loaded by Bitflux to the
corresponding sitemap (e.g. bitflux.xmap).</p>
-				<source><![:CDATA[<!--Frontpage:Webperls--><map:pipeline><!--Thisisthexmlthatwillbeeditedwithbitflux--><map:matchpattern="webperls.xml"><map:generatesrc="content/authoring/frontpage/webperls.xml"/><map:serializetype="xml"/></map:match><map:matchpattern="stylesheets/webperls.xsl"><map:generatesrc="cocoon://unipublic/authoring/index.xhtml"/><map:transformsrc="xslt/front//authoring/webperls-bitflux.xsl"/><map:serializetype="xml"/></map:match><map:matchpattern="schemas/webperls.xsd"><map:readsrc="config/doctypes/schemas/webperls-bitflux.xsd"mime-type="text/xml"/></map:match><map:matchpattern="css/webperls.css"><map:readsrc="resources/css/front-bitflux.css"mime-type="text/css"/></map:match></map:pipeline>]]></source>
+				<source><![CDATA[<!--Frontpage:Webperls--><map:pipeline><!--Thisisthexmlthatwillbeeditedwithbitflux--><map:matchpattern="webperls.xml"><map:generatesrc="content/authoring/frontpage/webperls.xml"/><map:serializetype="xml"/></map:match><map:matchpattern="stylesheets/webperls.xsl"><map:generatesrc="cocoon://unipublic/authoring/index.xhtml"/><map:transformsrc="xslt/front//authoring/webperls-bitflux.xsl"/><map:serializetype="xml"/></map:match><map:matchpattern="schemas/webperls.xsd"><map:readsrc="config/doctypes/schemas/webperls-bitflux.xsd"mime-type="text/xml"/></map:match><map:matchpattern="css/webperls.css"><map:readsrc="resources/css/front-bitflux.css"mime-type="text/css"/></map:match></map:pipeline>]]></source>
 				<p>You also have to add a section to bitflux.xmap that matches the post request
that is sent to the server by bitflux for saving the document. It basically indicates where
the xml file is saved.</p>
-				<source><![:CDATA[<!--Post--><map:pipeline><!--SaveFrontpage--><map:matchpattern="save/*"><map:acttype="xopushandler"><!--Locationwherethexmlfilethatissentbybitfluxhastobesaved--><map:parametername="save-filename"value="frontpage/{1}"/><!--Theserverwilltelltheeditorthatthefilewassavedsuccessfully.Theeditorhastodotheredirection.Thisxmlissenttobitfluxaftersaving--><map:generatesrc="../../content/bitflux/response.xml"/><map:serializetype="xml"/></map:act><map:generatesrc="../../content/xopus/error.xml"/><map:serializetype="xml"/></map:match><!--Errorhandling--><map:handle-errors><map:transformsrc="context://stylesheets/system/error2html.xsl"/><map:serializestatus-code="500"/></map:handle-errors></map:pipeline><!--/POST-->]]></source>
+				<source><![CDATA[<!--Post--><map:pipeline><!--!SaveFrontpage--><map:matchpattern="save/*"><map:acttype="xopushandler"><!--Locationwherethexmlfilethatissentbybitfluxhastobesaved--><map:parametername="save-filename"value="frontpage/{1}"/><!--Theserverwilltelltheeditorthatthefilewassavedsuccessfully.Theeditorhastodotheredirection.Thisxmlissenttobitfluxaftersaving--><map:generatesrc="../../content/bitflux/response.xml"/><map:serializetype="xml"/></map:act><map:generatesrc="../../content/xopus/error.xml"/><map:serializetype="xml"/></map:match><!--Errorhandling--><map:handle-errors><map:transformsrc="context://stylesheets/system/error2html.xsl"/><map:serializestatus-code="500"/></map:handle-errors></map:pipeline><!--/POST-->]]></source>
 			</section>
 			<anchor id="two"/>
 			<section><title>2. Creating the XSLT</title>
 				<p>The XSLT that is used by bitflux needs to be in a certain form in order to specify
what can be edited through bitflux. So you have to provide a bitflux-specific XSLT. The easiest
way to achieve this is to build the XSLT dynamically.    </p>
-				<source><![:CDATA[<map:matchpattern="stylesheets/webperls.xsl"><map:generatesrc="cocoon://unipublic/authoring/index.xhtml"/><map:transformsrc="xslt/front//authoring/webperls-bitflux.xsl"/><map:serializetype="xml"/></map:match>]]></source>
+				<source><![CDATA[<map:matchpattern="stylesheets/webperls.xsl"><map:generatesrc="cocoon://unipublic/authoring/index.xhtml"/><map:transformsrc="xslt/front//authoring/webperls-bitflux.xsl"/><map:serializetype="xml"/></map:match>]]></source>
 				<p>The generator get the xhtml of the entire page through the cocoon protocol.</p>
 				<p>The transform stylesheet converts the xhtml to a stylesheet (i.e. adds the xsl:stylesheet
element etc.) and replaces the sections that should be editable with the bitflux specific
code:</p>
 				<source><!node()">">
@@ -51,12 +51,12 @@
 ]]></source>
 				<p>In order to indicate what part should be editable you can add an attribute to
the respective xhtml element (in this example: bxe-editable="true"). The above stylesheet
then replaces this element with the xml element that can be edited at that position.</p>
 				<p>The attribute "bxe-editable" has to be added in the XSLT that renders the page.
This could look something like that:</p>
-				<source><![:CDATA[<xsl:templatematch="webperls"><tableborder="0"cellpadding="2"cellspacing="0"bgcolor="#CCCCFF"><spanbxe-editable="webperlen"><snip>Heregoesthexslt/xhtmlcodethatdisplaysthispartofthepage.</snip></span></table></xsl:template>]]></source>
+				<source><![CDATA[<xsl:templatematch="webperls"><tableborder="0"cellpadding="2"cellspacing="0"bgcolor="#CCCCFF"><spanbxe-editable="webperlen"><snip>Heregoesthexslt/xhtmlcodethatdisplaysthispartofthepage.</snip></span></table></xsl:template>]]></source>
 			</section>
 			<anchor id="three"/>
 			<section><title>3. Creating the XSD</title>
 				<p>The XSD is bitflux-specific and quite simple (e.g. minOccurs and maxOccurs are
not supported). It tells the editor where which elements can be inserted and deleted. Have
a look at the examples! A simple element definition could look like this:</p>
-				<source><![:CDATA[<xs:elementname="title"type="xs:string"><xs:annotation><xs:documentationxml:lang="en">Title</xs:documentation><xs:appinfo><bxe:name>Title</bxe:name><bxe:noaddparas>1</bxe:noaddparas><bxe:requiredattributes>href</bxe:requiredattributes><!--TheCDATA-codeisinsertedwhentheuserspressesthe"return"key--><bxe:returnelement><![CDATA[<Byline>Byline</Byline>]
]></bxe:returnelement> 
+				<source><![CDATA[<xs:elementname="title"type="xs:string"><xs:annotation><xs:documentationxml:lang="en">Title</xs:documentation><xs:appinfo><bxe:name>Title</bxe:name><bxe:noaddparas>1</bxe:noaddparas><bxe:requiredattributes>href</bxe:requiredattributes><!--TheCDATA-codeisinsertedwhentheuserspressesthe"return"key--><bxe:returnelement><![CDATA[<Byline>Byline</Byline>]
]></bxe:returnelement> 
 		</xs:appinfo>
 	</xs:annotation>
 </xs:element>
@@ -75,18 +75,18 @@
 </xs:element>
 ]]></source>
 				<p>The xml that is represented by the sample xsd above look like this:</p>
-				<source><![:CDATA[<webperls><webperl><title>SomeTitle</title><byline>SomeByline</byline></webperl><webperl><title>SomeTitle</title><byline>SomeByline</byline></webperl></webperls>]]></source>
+				<source><![CDATA[<webperls><webperl><title>!SomeTitle</title><byline>!SomeByline</byline></webperl><webperl><title>!SomeTitle</title><byline>!SomeByline</byline></webperl></webperls>]]></source>
 				<p>Because neither the bitflux-xsd nor the css is "context-sensitive" (head/title,
document/title, block/title are treated all the same) it is strongly recommended to use unique
element names (e.g. "headline", "title", "subtitle", "block_title"). It is also advisable
to use only lower-case element names due to a strange behavior of Mozilla with respect to
cases.</p>
 			</section>
 			<anchor id="four"/>
 			<section><title>4. Creating the CSS</title>
 				<p>In the CSS you define how the xml elements that are editable are displayed in
the editor: You assign a style to every xml element. That's because it is the xml itself that
is displayed and edited in the browser (and not html), and the styles define the look of the
element.</p>
-				<source><![:CDATA[title,byline{font-size:11px;font-family:Geneva,Verdana,Helvetica,Arial,Swiss;}title,byline{display:block;margin:1.33em0;}]]></source>
+				<source><![CDATA[title,byline{font-size:11px;font-family:Geneva,Verdana,Helvetica,Arial,Swiss;}title,byline{display:block;margin:1.33em0;}]]></source>
 			</section>
 			<anchor id="five"/>
 			<section><title>5. Adding an entry to the menu</title>
 				<p>Now you only have to add an entry to the menu bar an you are done! This is done
in the corresponding xsp file that generates the menu of the page: e.g. src/webapp/lenya/pubs/unipublic/config/menus/front.xsp</p>
-				<source><![:CDATA[<item><xsp:attributename="href"><xsp:expr>"/lenya/bitflux/in]]><![:CDATA[dex.html?url-xml="+bitflux_prefix+"/webperls.xml&amp;url-xslt="+bitflux_prefix+"/stylesheets/webperls.xsl&amp;url-xsd="+bitflux_prefix+"/schemas/webperls.xsd&amp;url-css="+bitflux_prefix+"/css/webperls.css&amp;url-post="+bitflux_prefix+"/save/webperls.xml&amp;url-back="+xsp_lenya_context_prefix+"/authoring/index.html"</xsp:expr></xsp:attribute>Edit&#160;Webperls</item>]]></source>
+				<source><![CDATA[<item><xsp:attributename="href"><xsp:expr>"/lenya/bitflux/in]]><![CDATA[dex.html?url-xml="+bitflux_prefix+"/webperls.xml&amp;url-xslt="+bitflux_prefix+"/stylesheets/webperls.xsl&amp;url-xsd="+bitflux_prefix+"/schemas/webperls.xsd&amp;url-css="+bitflux_prefix+"/css/webperls.css&amp;url-post="+bitflux_prefix+"/save/webperls.xml&amp;url-back="+xsp_lenya_context_prefix+"/authoring/index.html"</xsp:expr></xsp:attribute>Edit&#160;Webperls</item>]]></source>
 				<p>The "url-back" parameter indicates the URL that is loaded after the user leaves
the bitflux editor (by pressing "save and exit").</p>
 			</section>
 		</section>
@@ -107,7 +107,7 @@
 		</section>
 		<section><title>Download via CVS</title>
 			<p>Bitflux Editor is included in the Lenya cvs. So you don't need to download it
separately. If you want to be sure to use the latest version, you can get it from the Bitflux
cvs:</p>
-			<source><![:CDATA[cvs-d:pserver:anonymous@bitflux.ch:/var/lib/cvs/editorloginReturncvs-d:pserver:anonymous@bitflux.ch:/var/lib/cvs/editorcoexample]]></source>
+			<source><![CDATA[cvs-d:pserver:anonymous@bitflux.ch:/var/lib/cvs/editorloginReturncvs-d:pserver:anonymous@bitflux.ch:/var/lib/cvs/editorcoexample]]></source>
 		</section>
 		<section><title>Browser Requirements</title>
 			<section><title>Mozilla</title>
@@ -123,7 +123,7 @@
 				<p>
 The parameters can be configured within the file inc/config.xml
 </p>
-				<source><![:CDATA[<imput><filename="BX_xmlfile"method="http"isParam="true">url-xml</file><filename="BX_xslfile"isParam="true">url-xslt</file><filename="BX_schemafile"isParam="true">url-xsd</file></input><css><fileisParam="true">url-css</file></css><output><filename="BX_posturl"method="lenya"isParam="true">url-post</file></output>]]></source>
+				<source><![CDATA[<imput><filename="BX_xmlfile"method="http"isParam="true">url-xml</file><filename="BX_xslfile"isParam="true">url-xslt</file><filename="BX_schemafile"isParam="true">url-xsd</file></input><css><fileisParam="true">url-css</file></css><output><filename="BX_posturl"method="lenya"isParam="true">url-post</file></output>]]></source>
 				<p>
 Beware that the MIME-TYPE for the schema file (xsd) is set properly by the server to text/xml.
 Lenya does that for you already, but in case you serve it via Apache you have to update Apache's
config.

Mime
View raw message