Xinha Resource

Name:
xinha
Namespace:
http://www.wyona.org/yanel/resource/1.0
UniversalName
http://www.wyona.org/yanel/resource/1.0::xinha
Description:
xinha Editor to edit xhtml
Java Class:
org.wyona.yanel.impl.resources.Xinhaesource

Views

View IDMime typeType
DEFAULTtext/htmljelly
fix-wellformnesstext/htmljelly
donetext/htmljelly
canceltext/htmljelly
errortext/htmljelly

Request Parameter

View IDNameExplanations
DEFAULTedit-patha data repository path. points to the document you want to edit

Examples

.yanel-rc Example

<?xml version="1.0"?>
<yanel:resource-config xmlns:yanel="http://www.wyona.org/yanel/rti/1.0">
  <yanel:rti name="xinha" namespace="http://www.wyona.org/yanel/resource/1.0"/>
    <yanel:custom-config>
     <views>
      <view id="default" type="jelly">
        <template>rthtdocs:/xinha.jelly</template>
        <xslt>/xslt/global.xsl</xslt>
        <mime-type>text/html</mime-type>
      </view>
      <view id="fix-wellformness" type="jelly">
        <template>rthtdocs:/xinha-fix.jelly</template>
        <xslt>/xslt/global.xsl</xslt>
        <mime-type>text/html</mime-type>
      </view>
      <view id="done" type="jelly">
        <template>rthtdocs:/xinha-status.jelly</template>
        <xslt>/xslt/global.xsl</xslt>
      </view>
      <view id="cancel" type="jelly">
        <template>rthtdocs:/xinha-status.jelly</template>
        <xslt>/xslt/global.xsl</xslt>
      </view>
      <view id="error" type="jelly">
        <template>rthtdocs:/xinha-status.jelly</template>
        <xslt>/xslt/global.xsl</xslt>
      </view>
    </views>
  </yanel:custom-config>
</yanel:resource-config>

Explanations

Once you registered the xinha resource in yanel (add <resource-type src="$XINHA_RESOURCE_HOME" compile="true"/> to yanels resource-types.xml) your realms resource-config (e.g. /usecases/xinha.yanel-rc) repository
you can access xinha via browser e.g. https://localhost:8443/yanel/$YOUR_REALM/usecases/xinha.html?edit-path=/de/ueber.html.

you have to provide a request parameter "edith-path" in order to allow the xinha resource to know which document to edit.

Menu Example

an example how to add this resource to the menu

Index: src/realms/yanel-website/src/java/org/wyona/yanel/servlet/menu/impl/YanelWebsiteMenu.java
===================================================================
--- src/realms/yanel-website/src/java/org/wyona/yanel/servlet/menu/impl/YanelWebsiteMenu.java	(revision 31673)
+++ src/realms/yanel-website/src/java/org/wyona/yanel/servlet/menu/impl/YanelWebsiteMenu.java	(working copy)
@@ -61,7 +61,15 @@
 
         sb.append("<ul><li>");
         sb.append("<div id=\"yaneltoolbar_menutitle\">Edit</div><ul>");
-        sb.append("<li class=\"haschild\">Open with&#160;&#160;&#160;<ul><li>Source editor</li><li>WYSIWYG editor</li></ul></li>");
+        sb.append("<li class=\"haschild\">Open with&#160;&#160;&#160;");
+        sb.append("<ul><li>Source editor</li>");
+        sb.append("<li>WYSIWYG editor</li>");
+        if (ResourceAttributeHelper.hasAttributeImplemented(resource, "Modifiable", "2")) {
+            sb.append("<li><a href=\"" + backToRealm + "usecases/xinha.html?edit-path=" + resource.getPath() + "\">Edit page with Xinha&#160;&#160;&#160;</a></li>");
+        } else {
+            sb.append("<li><a>Edit page with Xinha&#160;&#160;&#160;</a></li>");
+        }
+        sb.append("</ul></li>");
 
         if (ResourceAttributeHelper.hasAttributeImplemented(resource, "Versionable", "2")) {
             RevisionInformation[] revisions = ((VersionableV2) resource).getRevisions();

Todo