[Yanel-commits] rev 48578 - in public/yanel/trunk/src: realms/yanel-website/content realms/yanel-website/content/3004c6ec-2c35-41ca-a308-c762f5fad8df.yarep realms/yanel-website/content/d1482711-6ff6-4eb7-aa9e-f26d59f8d911.yarep resources/xml/yanel-htdocs/doc

memo at wyona.com memo at wyona.com
Fri Apr 9 14:48:20 CEST 2010


Author: memo
Date: 2010-04-09 14:48:20 +0200 (Fri, 09 Apr 2010)
New Revision: 48578

Modified:
   public/yanel/trunk/src/realms/yanel-website/content/3004c6ec-2c35-41ca-a308-c762f5fad8df
   public/yanel/trunk/src/realms/yanel-website/content/3004c6ec-2c35-41ca-a308-c762f5fad8df.yarep/meta
   public/yanel/trunk/src/realms/yanel-website/content/d1482711-6ff6-4eb7-aa9e-f26d59f8d911
   public/yanel/trunk/src/realms/yanel-website/content/d1482711-6ff6-4eb7-aa9e-f26d59f8d911.yarep/meta
   public/yanel/trunk/src/resources/xml/yanel-htdocs/doc/index.html
Log:
documentation updated

Modified: public/yanel/trunk/src/realms/yanel-website/content/3004c6ec-2c35-41ca-a308-c762f5fad8df
===================================================================
--- public/yanel/trunk/src/realms/yanel-website/content/3004c6ec-2c35-41ca-a308-c762f5fad8df	2010-04-09 12:17:03 UTC (rev 48577)
+++ public/yanel/trunk/src/realms/yanel-website/content/3004c6ec-2c35-41ca-a308-c762f5fad8df	2010-04-09 12:48:20 UTC (rev 48578)
@@ -8,10 +8,10 @@
 <h2>Resource Type Configuration Map</h2>
 <p>To configure a bunch of URLs in the same way, one can use a <em>resource type configuration map</em>, which is an XML file called <code>map.rc-map</code>. This file has to be in the repository which is configured as the <em>rti (resource type identifier)</em> repository in a realm (in the file <a href="../realm/realm-configuration.html"><code>realm.xml</code></a>).</p>
 <p>Within this file, one can define a wildcard matcher to select a group of URLs which points for every match to one <a href="resource_type_configuration.html">resource-type-configuration</a>, as in this example:</p>
-<pre>&lt;rc-map&gt;<br />&#160; &lt;matcher pattern="/Xopus**.html" rcpath="/node_yanel-rc.xml"/&gt;<br />&#160; &lt;matcher pattern="**.tinymce-edit.html" rcpath="/usecases/tinymce.html.yanel-rc"/&gt;<br />&#160; &lt;matcher pattern="/**/create-new-page.html" rcpath="/create-new-page.html.yanel-rc"/&gt;<br />&#160; &lt;matcher pattern="/**.html" rcpath="/generic-xhtml-page_yanel-rc.xml"/&gt;<br />&lt;/rc-map&gt;
+<pre>&lt;rc-map&gt;<br />  &lt;matcher pattern="/en/index.html" rcpath="/homepage_yanel-rc.xml"/&gt;<br />&#160; &lt;matcher pattern="/**.html" rcpath="/generic-xhtml-page_yanel-rc.xml"/&gt;<br />  &lt;matcher pattern="/news/**.html" rcpath="/web-bulletin-entry_yanel-rc.xml"/&gt;<br />&lt;/rc-map&gt;
 </pre>
 <p>Please note that the attribute <code>rcpath</code> uses <em>absolute</em> pathnames, because each repository is considered a separate volume, and all paths refer to the root of this volume, in this case the directory where the <a href="resource_type_configuration.html">resource type configuration</a> repository is located.</p>
 <p>&#160;</p>
 </div>
 </body>
-</html>
+</html>
\ No newline at end of file

Modified: public/yanel/trunk/src/realms/yanel-website/content/3004c6ec-2c35-41ca-a308-c762f5fad8df.yarep/meta
===================================================================
--- public/yanel/trunk/src/realms/yanel-website/content/3004c6ec-2c35-41ca-a308-c762f5fad8df.yarep/meta	2010-04-09 12:17:03 UTC (rev 48577)
+++ public/yanel/trunk/src/realms/yanel-website/content/3004c6ec-2c35-41ca-a308-c762f5fad8df.yarep/meta	2010-04-09 12:48:20 UTC (rev 48578)
@@ -1,7 +1,7 @@
-yarep_size<long>:1652
-yarep_checkinDate<date>:2010-03-24T11:03:23:284+0100
+yarep_size<long>:1551
+yarep_checkinDate<date>:2010-04-09T14:32:12:983+0200
+yarep_lastModifed<long>:1270816332000
 yarep_type<string>:resource
-yarep_lastModifed<long>:1269425003000
 yarep_checkoutUserID<string>:lenya
-yarep_checkoutDate<date>:2010-03-24T11:03:05:896+0100
 yarep_isCheckedOut<boolean>:false
+yarep_checkoutDate<date>:2010-04-09T14:26:49:638+0200

Modified: public/yanel/trunk/src/realms/yanel-website/content/d1482711-6ff6-4eb7-aa9e-f26d59f8d911
===================================================================
--- public/yanel/trunk/src/realms/yanel-website/content/d1482711-6ff6-4eb7-aa9e-f26d59f8d911	2010-04-09 12:17:03 UTC (rev 48577)
+++ public/yanel/trunk/src/realms/yanel-website/content/d1482711-6ff6-4eb7-aa9e-f26d59f8d911	2010-04-09 12:48:20 UTC (rev 48578)
@@ -1,12 +1,32 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <title>Resource Type Configuration</title>
-  </head>
-  <body>
-<h2>Resource Type Configuration</h2>
-<p>Yanel looks up the configuration for a requested URL to determine what resource-type to use. The resource-type configurations are located in the <em>repository</em> which is configured (in the file <a href="../realm/realm-configuration.html"> <code>realm.xml</code> </a>) as the <em>rti</em> (resource type identifier, see the XML tag<code> &lt;rti&gt;</code> in <a href="../realm/realm-configuration.html#rc-repo"> <code>realm.xml</code></a>) repository of the realm. This repository either has the same structure as the data repository or uses an <a href="rc-map.html"> <code>rc-map</code></a>. You can use a configuration file for a certain URL, while at the same time using an <a href="rc-map.html"> <code>rc-map</code> </a> for a pattern of URLs.</p>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+<title>Resource Type Configurations</title>
+</head>
+<body>
+<div class="instructions">
+<h1>Resource Type Configurations</h1>
+<p>Yanel looks up the configuration for a requested URL to determine what resource-type to use. The resource-type configurations are located in the <em>repository</em> which is configured (in the file <a href="../realm/realm-configuration.html"> <code>realm.xml</code> </a>) as the <em>rti</em> (resource type identifier, see the XML tag<code> &lt;rti&gt;</code> in <a href="../realm/realm-configuration.html#rc-repo"> <code>realm.xml</code></a>) repository of the realm. This repository is used to configure Yanel's responses to requests, based on the request URLs, and normally contains 3 types of entries:</p>
+<ul>
+<li>The "<code>map.rc-map</code>" file</li>
+<li>"<code>*_yanel-rc.xml</code>" files </li>
+<li>"<code>*.yanel-rc files</code>" (e.g. *.html.yanel-rc, *.xml.yanel-rc, etc.)</li>
+</ul>
+<h2>The "map.rc-map" file</h2>
+<p>This is an XML file used to configure responses based on URLs using wildcards, enabling you to configure collections of URLs in the same way. For details, see <a href="rc-map.html"> <code>rc-map</code></a>.</p>
+<h2>The "*_yanel-rc.xml" files</h2>
+<p>These files contain configurations for the patterns matched based on the <a href="rc-map.html"> <code>rc-map</code></a>.</p>
+<h2>The "*.yanel-rc" files</h2>
+<p>These are used to configure single URLs. The URL matched is the same as the file name, without the <code>.yanel-rc</code> extension. For example, the request URL <code>{realm-URL}/discoveries.html</code> will be matched to the file <code>discoveries.html.yanel-rc.</code></p>
+<p><span style="text-decoration: underline;"><strong>Note 1:</strong></span> You can use a configuration file for a certain URL, while at the same time using an <a href="rc-map.html"> <code>rc-map</code></a> for a pattern of URLs.</p>
+<p><span style="text-decoration: underline;"><strong>Note 2:</strong></span> These file names are a convention only. To better understand the matching mechanism, also see the page "<a href="http://yanel.wyona.org/en/documentation/how-a-request-is-being-processed.html">How a request is processed</a>".</p>
+<h2>Example 1: An XML Resource</h2>
+<p>This type of resource returns an XML snippet/document, which is usually further processed using XSLTs:</p>
+<pre>&lt;yanel:resource-config xmlns:yanel="http://www.wyona.org/yanel/rti/1.0"&gt;<br />&#160; &lt;yanel:rti name="xml" namespace="http://www.wyona.org/yanel/resource/1.0"/&gt;<br />&#160; &lt;yanel:property name="mime-type" value="text/html"/&gt;<br />&#160; &lt;yanel:property name="xslt" value="/app/xslt/global.xsl"/&gt;<br />&lt;/yanel:resource-config&gt;</pre>
+<h2>Example 2: A resource creator<br /></h2>
+<p>As a more complex example, consider this configuration for a resource creator that creates new XHTML pages:</p>
+<pre>&lt;yanel:resource-config xmlns:yanel="http://www.wyona.org/yanel/rti/1.0"&gt;<br />&#160; &lt;yanel:rti name="resource-creator" namespace="http://www.wyona.org/yanel/resource/1.0"/&gt;<br />&#160; &lt;yanel:property name="lookin" value="/path/to/resource/creation/dir/"/&gt;<br />&#160; &lt;yanel:custom-config&gt;<br />&#160;&#160;&#160; &lt;rc:resource-types xmlns:rc="http://www.wyona.org/yanel/resource/resource-creator/1.0"&gt;<br />&#160;&#160;&#160;&#160;&#160; &lt;rc:resource-type name="xml" namespace="http://www.wyona.org/yanel/resource/1.0"&gt;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;rc:display-name&gt;New XHTML Page&lt;/rc:display-name&gt;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;rc:property name="mime-type" value="text/html"/&gt;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;rc:property name="source-mime-type" value="application/xhtml+xml"/&gt;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;rc:property name="template" value="y!
 anelrepo:/templates/my-template.html"/&gt;<br />&#160;&#160;&#160;&#160;&#160; &lt;/rc:resource-type&gt;<br />&#160;&#160;&#160; &lt;/rc:resource-types&gt;<br />&#160; &lt;/yanel:custom-config&gt;<br />&lt;/yanel:resource-config&gt;</pre>
+<p>&#160;</p>
+</div>
 </body>
 </html>
\ No newline at end of file

Modified: public/yanel/trunk/src/realms/yanel-website/content/d1482711-6ff6-4eb7-aa9e-f26d59f8d911.yarep/meta
===================================================================
--- public/yanel/trunk/src/realms/yanel-website/content/d1482711-6ff6-4eb7-aa9e-f26d59f8d911.yarep/meta	2010-04-09 12:17:03 UTC (rev 48577)
+++ public/yanel/trunk/src/realms/yanel-website/content/d1482711-6ff6-4eb7-aa9e-f26d59f8d911.yarep/meta	2010-04-09 12:48:20 UTC (rev 48578)
@@ -1,7 +1,7 @@
-yarep_size<long>:1074
-yarep_checkinDate<date>:2010-03-24T10:45:57:420+0100
-yarep_lastModifed<long>:1269423957000
+yarep_size<long>:4289
+yarep_checkinDate<date>:2010-04-09T15:15:46:738+0200
+yarep_lastModifed<long>:1270818946000
 yarep_type<string>:resource
 yarep_checkoutUserID<string>:lenya
 yarep_isCheckedOut<boolean>:false
-yarep_checkoutDate<date>:2010-03-24T10:45:27:100+0100
+yarep_checkoutDate<date>:2010-04-09T15:15:34:656+0200

Modified: public/yanel/trunk/src/resources/xml/yanel-htdocs/doc/index.html
===================================================================
--- public/yanel/trunk/src/resources/xml/yanel-htdocs/doc/index.html	2010-04-09 12:17:03 UTC (rev 48577)
+++ public/yanel/trunk/src/resources/xml/yanel-htdocs/doc/index.html	2010-04-09 12:48:20 UTC (rev 48578)
@@ -90,9 +90,35 @@
     &lt;/yanel:resource-config>
 </pre>
 
-<p>
-Available serializers are HTML_TRANSITIONAL, XHTML_STRICT, XML, TEXT (whereas default is XHTML_STRICT). See in the yanel documentation (BasicXMLResource) for more info on <b>XSLT_Parameter, i18n, Protocol-Schemas and Custom views</b> or have a look at the source src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java for details.
-</p>
+<p>Available serializers are HTML_TRANSITIONAL, XHTML_STRICT, XML, TEXT 
+(whereas default is XHTML_STRICT). See in the yanel documentation (BasicXMLResource) 
+for more info on <b>XSLT_Parameter, i18n, Protocol-Schemas and Custom views</b> or 
+have a look at the source src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java 
+for details.</p>
     
+    <p><b>Resource creation</b></p>
+
+<pre>
+    &lt;yanel:resource-config xmlns:yanel="http://www.wyona.org/yanel/rti/1.0">
+      &lt;yanel:rti name="resource-creator" namespace="http://www.wyona.org/yanel/resource/1.0"/>
+      &lt;yanel:property name="lookin" value="/path/to/creation/dir/"/>
+      &lt;yanel:custom-config>
+        &lt;rc:resource-types xmlns:rc="http://www.wyona.org/yanel/resource/resource-creator/1.0">
+          &lt;rc:resource-type name="xml" namespace="http://www.wyona.org/yanel/resource/1.0">
+            &lt;rc:display-name>New XHTML Page&lt;/rc:display-name>
+            &lt;rc:property name="mime-type" value="text/html"/>
+            &lt;rc:property name="source-mime-type" value="application/xhtml+xml"/>
+            &lt;rc:property name="template" value="yanelrepo:/path/to/my-template.html"/>
+          &lt;/rc:resource-type>
+        &lt;/rc:resource-types>
+      &lt;/yanel:custom-config>
+    &lt;/yanel:resource-config>
+</pre>
+
+<p>The template needs to be a well-formed XHTML document. If the property "template" is not defined, 
+a default template will be used. When creating the resource, 
+the user will be asked to enter a title, which will be set as the title of the new XHTML
+document.</p>
+
   </body>
 </html>



More information about the Yanel-commits mailing list