[Yulup-commits] rev 23031 - in public/yulup/src/branches: . ANNOTATION_BRANCH/yulup/src ANNOTATION_BRANCH/yulup/src/chrome/content ANNOTATION_BRANCH/yulup/src/chrome/content/annotationsidebar ANNOTATION_BRANCH/yulup/src/chrome/locale/de ANNOTATION_BRANCH/yulup/src/chrome/locale/en ANNOTATION_BRANCH/yulup/src/chrome/locale/es ANNOTATION_BRANCH/yulup/src/chrome/locale/fr ANNOTATION_BRANCH/yulup/src/chrome/locale/ku ANNOTATION_BRANCH/yulup/src/chrome/locale/tr ANNOTATION_BRANCH/yulup/src/chrome/locale/xml ANNOTATION_BRANCH/yulup/src/chrome/skin

andi at wyona.com andi at wyona.com
Wed Feb 28 16:17:35 CET 2007


Author: andi
Date: 2007-02-28 16:17:33 +0100 (Wed, 28 Feb 2007)
New Revision: 23031

Added:
   public/yulup/src/branches/ANNOTATION_BRANCH/
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/annotation.js
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/annotationdialog.xul
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/annotationparser10.js
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/annotationsidebar/
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/annotationsidebar/annotationsidebar-overlay.xul
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/annotationsidebar/annotationsidebar.js
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/annotationsidebar/annotationsidebar.xul
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/de/annotation.dtd
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/de/annotationsidebar.dtd
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/de/annotationsidebar.properties
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/en/annotation.dtd
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/en/annotationsidebar.dtd
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/en/annotationsidebar.properties
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/es/annotation.dtd
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/es/annotationsidebar.dtd
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/es/annotationsidebar.properties
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/fr/annotation.dtd
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/fr/annotationsidebar.dtd
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/fr/annotationsidebar.properties
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/ku/annotation.dtd
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/ku/annotationsidebar.dtd
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/ku/annotationsidebar.properties
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/tr/annotation.dtd
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/tr/annotationsidebar.dtd
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/tr/annotationsidebar.properties
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/xml/annotation.dtd.xml
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/xml/annotationsidebar.dtd.xml
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/xml/annotationsidebar.properties.xml
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/skin/annotation.css
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/skin/annotationsidebar.css
Modified:
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome.manifest
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/neutron.js
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/neutronparser10.js
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/yulup.js
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/yulup.xul
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/de/yulup.dtd
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/en/yulup.dtd
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/es/yulup.dtd
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/fr/yulup.dtd
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/ku/yulup.dtd
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/tr/yulup.dtd
   public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/xml/yulup.dtd.xml
Log:
Annotation branch from Florian's internhip deliverable.


Copied: public/yulup/src/branches/ANNOTATION_BRANCH (from rev 23022, public/yulup/src/trunk)

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/annotation.js
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/content/annotation.js	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/annotation.js	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,334 @@
+/*
+ * ***** BEGIN LICENSE BLOCK *****
+ * Copyright 2006 Wyona AG Zurich
+ *
+ * This file is part of Yulup.
+ *
+ * Yulup is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Yulup is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Yulup; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * ***** END LICENSE BLOCK *****
+ */
+
+/**
+ * @author Florian Fricker
+ *
+ * This file implements the Annotation class. The Annotation class
+ * creates the annotation-protocol and handles the http-requests to
+ * post the protocol.
+ *
+ */
+
+const Annotation = {
+    __editorController : null,
+    __view             : null,
+    __webBrowserFind   : null,
+    __commandController: null,
+    __inputString      : null,
+    __TriggerURI       : null,
+    __retValue                 : null,
+
+    dialogFields: null,
+
+    // Handles the CancelListener for the dialog
+    onDialogCancelListener: function () {
+        alert("You have cancled your annotation");
+        return true;
+    },
+
+    // Handles the SaveListener for the dialog
+    onDialogSaveListener: function () {
+
+        // Check user information
+        AnnotationValue = Annotation.checkUserValue(Annotation.dialogFields.nameStringTextbox.value, Annotation.dialogFields.subjectStringTextbox.value, Annotation.dialogFields.commentStringTextbox.value);
+
+        // Check if the user values are valid
+        if(AnnotationValue)
+            {
+                // Generate the Xpointer element string from the DOM-Tree
+                xPointerElements = Annotation.generateXpointerElements(Annotation.__editorController.getSelection().focusNode, "");
+
+                // Get the selected text from the html content
+                xPointerString = Annotation.__editorController.getSelection().toString();
+
+                // Get the Xpointer position
+                xPointerPosition = Annotation.getXpointerPosition();
+
+                // Generate the full Xpointer for the Annotation
+                xPointerComplete = "#xpointer(string-range(/" + xPointerElements + ",\"" + xPointerString + "\"))[" + xPointerPosition + "]";
+
+                // Generate the full Annotation protocol
+                AnnotationProtocol = Annotation.writeAnnotationProtocol(Annotation.dialogFields.nameStringTextbox.value, Annotation.dialogFields.subjectStringTextbox.value, Annotation.dialogFields.commentStringTextbox.value, xPointerComplete);
+
+                // Debug: Dump the Annotation protocol
+                /* DEBUG */ dump("Full Annotation protocol: " + AnnotationProtocol);
+
+                // Save the Annotation protocol to the Annotation.__retValue properties
+                Annotation.__retValue.content = AnnotationProtocol;
+
+                return true;
+            }
+        else
+            {
+                return false;
+            }
+    },
+
+    /*
+     * This function checks the user input value and stops the
+     * process if a input value is broken.
+     *
+     */
+    checkUserValue: function (name, subject, body) {
+
+        // Set a flag to check the status
+        var status = null;
+
+        // Check if the user input is available
+        if(name && subject && body)
+            {
+                return true;
+            }
+        // If no user input available, display a alert message and return false to the SaveListener
+        else
+            {
+                // Check the name textbox
+                if(!name) {
+                    alert("Pleas enter your name!");
+                    return false;
+                }
+
+                // Check the subject textbox
+                if(!subject) {
+                    alert("Pleas enter a subject!");
+                    return false;
+                }
+
+                // Check the body textbox
+                if(!body) {
+                    alert("Pleas enter your comment!");
+                    return false;
+                }
+            }
+    },
+
+    /*
+     * This function gets the Xpointer position which is needed by the Xpointer
+     * to select the right string
+     */
+
+    getXpointerPosition: function () {
+
+        // Get the selected node value
+        var nodeValue = Annotation.__editorController.getSelection().focusNode.textContent;
+
+        // Get the selected string value
+        var AnnotationString = Annotation.__editorController.getSelection().toString();
+
+        var AnnotationStringLenght = AnnotationString.length;
+
+        var nodeIndexCounter = new Array;
+
+        var counter = 0;
+
+        nodeIndexCounter.push(0);
+
+        var position = 0;
+
+        // Push all strings which matches with the selected string into an array
+        while(nodeIndexCounter[counter] != -1)
+            {
+                nodeIndexCounter.push(nodeValue.indexOf(AnnotationString, nodeIndexCounter[counter] + 1));
+                counter++;
+            }
+
+        counter = 0;
+
+        //Delete first and last element in array (0 and -1)
+
+        nodeIndexCounter.shift();
+
+        // If the array has just one element, then the string won't match with the other part of the text
+        if(nodeIndexCounter.length == 1)
+            {
+                position = 1;
+            }
+        else
+            {
+                // Check whitch position the selected string has in the whole text
+                while(nodeIndexCounter[counter] != -1)
+                    {
+
+                        nodeIndexRightToLeft = nodeIndexCounter[counter];
+                        nodeIndexLeftToRight = nodeIndexCounter[counter]  + AnnotationStringLenght;
+
+                        // Check if the text is selected from the right or left side
+                        if(Annotation.__editorController.getSelection().focusOffset == nodeIndexRightToLeft)
+                            {
+                                position = counter + 1;
+                                break;
+                            }
+                        else if (Annotation.__editorController.getSelection().focusOffset == nodeIndexLeftToRight)
+                            {
+                                position = counter + 1;
+                                break;
+                            }
+                        else
+                            {
+                                counter++;
+                            }
+
+                    }
+            }
+        // Return the text position of the selected string
+        return position;
+
+    },
+
+    /*
+     * This function gets the element string from
+     * the DOM-Tree. The element string is used
+     * for the Xpointer.
+     * Exp. of a element string: "/html/body/h1/"
+     */
+
+    generateXpointerElements: function (currentNode, xpointerNode) {
+
+        // Get the parent node
+        parentNode = currentNode.parentNode;
+
+        // When no parent node is available
+        if(parentNode != null)
+            {
+                childNodes = parentNode.childNodes;
+
+                var counter = 0;
+
+                // Iterate trough the DOM-Tree
+                for(;counter < childNodes.length;counter++)
+                    {
+                        // Check if the actual node is equal to the selected node
+                        if(childNodes.item(counter) == currentNode)
+                            {
+                                break;
+                            }
+                    }
+
+                // Save the actual node in lowercases
+                xpointerNode = "/" + currentNode.nodeName.toLowerCase() + "[" + counter + "]" + xpointerNode;
+
+                // Call the same function again to repeat the process until the parent node is reached
+                xpointerNode = Annotation.generateXpointerElements(parentNode, xpointerNode)
+
+                    }
+
+        // Return the xpointerNode
+        return xpointerNode;
+
+    },
+
+    /*
+     * This function generates the whole Annotation string
+     */
+
+    writeAnnotationProtocol: function(name, subject, comment, xpointer) {
+
+        // Get the current date
+        var date = Date();
+
+        var finalString = "<?xml version=\"1.0\" ?>"
+        + "<r:RDF xmlns:r=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\""
+        + "xmlns:a=\"http://www.w3.org/2000/10/annotation-ns#\""
+        + "xmlns:d=\"http://purl.org/dc/elements/1.1/\""
+        + "xmlns:h=\"http://www.w3.org/1999/xx/http#\">"
+        + "<r:Description>"
+        + "<r:type r:resource=\"http://www.w3.org/2000/10/annotation-ns#Annotation\"/>"
+        + "<r:type r:resource=\"http://www.w3.org/2000/10/annotationType#Comment\"/>"
+        + "<a:annotates r:resource=\"" + Annotation.__TriggerURI + "\"/>"
+        + "<a:context>" + Annotation.__TriggerURI + xpointer + "</a:context>"
+        + "<d:title>" + subject + "</d:title>"
+        + "<d:creator>" + name + "</d:creator>"
+        + "<a:created>" + date + "</a:created>"
+        + "<d:date>" + date + "</d:date>"
+        + "<a:body>"
+        + "<r:Description>"
+        + "<h:ContentType>text/html</h:ContentType>"
+        + "<h:Body r:parseType=\"Literal\">"
+        + "<html xmlns=\"http://www.w3.org/1999/xhtml\">"
+        + "<body>" + Annotation + "</body>"
+        + "</html>"
+        + "</h:Body>"
+        + "</r:Description>"
+        + "</a:body>"
+        + "</r:Description>"
+        + "</r:RDF>"
+
+        // Debug: Dump the Annotation string
+        dump("Final Annotation string: " + finalString);
+
+        // Return the Annotation string
+        return finalString;
+
+    },
+
+    /*
+     * This function checks if the input string is
+     * longer than 50 signs. If it is longer the it
+     * cuts the string to 50 signs.
+     */
+
+    checkInputString: function (aString) {
+
+        // Check the length, slice it when necessary and return the string
+        if(aString.length < "50")
+            {
+                return aString;
+            }
+        return aString.slice(0, 46) + "...";
+    },
+
+    /* This function is called when the dialog is loaded.
+     * It initialize the XUL elements and display the selected
+     * text on a label.
+     */
+
+    onLoadListener: function () {
+
+        // Initialize the window controllers
+        Annotation.__editorController = window.arguments[0];
+        Annotation.__TriggerURI = window.arguments[0].location.toString();
+        Annotation.__retValue = window.arguments[1];
+
+        // Initialize the XUL elements
+        Annotation.dialogFields = {
+            nameStringTextbox           : document.getElementById("uiAutorNameStringTextbox"),
+            subjectStringTextbox            : document.getElementById("uiAnnotationTitleStringTextbox"),
+            commentStringTextbox            : document.getElementById("uiAnnotationCommentStringTextbox"),
+            pointerStringLabel          : document.getElementById("uiPointerStringLabel"),
+        };
+
+        // Get the selected text range as a string
+        Annotation.__inputString = Annotation.__editorController.getSelection().toString();
+
+        /*
+         * Set the label value with the selected text range (Call
+         * the function "checkInputStream" to check the length of
+         * the string) otherwise the label could get overflowed.
+         */
+
+        Annotation.dialogFields.pointerStringLabel.value = Annotation.checkInputString(Annotation.__editorController.getSelection().toString());
+
+    },
+
+};

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/annotationdialog.xul
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/content/annotationdialog.xul	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/annotationdialog.xul	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,95 @@
+<?xml version="1.0"?>
+
+<!--
+# ***** BEGIN LICENSE BLOCK *****
+# Copyright 2006 Wyona AG Zurich
+#
+# This file is part of Yulup.
+#
+# Yulup is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# Yulup is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Yulup; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#
+# ***** END LICENSE BLOCK *****
+  -->
+
+<!--
+ * @author Florian Fricker
+ *
+ * This file includes the XUL code for the AnnotationDialog window.
+ * The file gets loaded by the AnnotationSidebarOverlay file.
+ *
+-->
+
+<!-- Load the css file to format the xul dialog -->
+<?xml-stylesheet href="chrome://yulup/skin/annotation.css" type="text/css"?>
+
+<!-- Load the dtd xml file for language support -->
+<!DOCTYPE dialog SYSTEM "chrome://yulup/locale/annotation.dtd">
+
+<!-- Add some listeners to the dialog -->
+<dialog id="uiYulupEditorAnnotationDialog"
+        orient="vertical"
+        align="stretch"
+        title="&annotationDialog.title;"
+        buttons="accept, cancel"
+        buttonlabelaccept="&annotationButtonName.accept;"
+        onload="Annotation.onLoadListener()"
+        ondialogcancel="return Annotation.onDialogCancelListener()"
+        ondialogaccept="return Annotation.onDialogSaveListener()"
+        persist="screenX screenY width height"
+        style="font: -moz-dialog;"
+        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+  <!-- Get the annotation class to create the annotation protocol -->
+  <script type="application/x-javascript"
+          src="chrome://yulup/content/common.js"/>
+
+  <script type="application/x-javascript"
+          src="chrome://yulup/content/annotation.js"/>
+
+  <!-- Build the dialog for the annotation information -->
+  <vbox>
+    <grid flex="1">
+      <columns>
+        <column/>
+        <column flex="1"/>
+      </columns>
+      <rows>
+        <!-- Place a image to the dialog -->
+        <row align="center" style="margin-bottom: 15px">
+          <vbox align="center">
+            <image id="annotationImage"/>
+          </vbox>
+          <label id="uiPointerStringLabel"/>
+        </row>
+        <!-- Create the name textbox -->
+        <row align="center">
+          <label control="uiAnnotationAutorNameStringTextbox" value="&annotationAutorNameStringTextbox.label;:"/>
+          <textbox id="uiAutorNameStringTextbox"/>
+        </row>
+        <!-- Create the title textbox -->
+        <row align="center">
+          <label control="uiAnnotationTitleStringTextbox" value="&annotationTitleStringTextbox.label;:"/>
+          <textbox id="uiAnnotationTitleStringTextbox"/>
+        </row>
+        <!-- Create the body textbox -->
+        <row align="center">
+          <label control="uiAnnotationCommentStringTextbox" value="&annotationCommentStringTextbox.label;:"/>
+          <textbox multiline="true" rows="5" id="uiAnnotationCommentStringTextbox"/>
+        </row>
+      </rows>
+    </grid>
+  </vbox>
+
+</dialog>

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/annotationparser10.js
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/content/annotationparser10.js	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/annotationparser10.js	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,202 @@
+/*
+ * ***** BEGIN LICENSE BLOCK *****
+ * Copyright 2006 Wyona AG Zurich
+ *
+ * This file is part of Yulup.
+ *
+ * Yulup is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Yulup is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Yulup; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * ***** END LICENSE BLOCK *****
+ */
+
+/*
+ * @author Andreas Wuest
+ * Original developer of the of atom parser
+ *
+ * @author Florian Fricker
+ * Modified the atom parser to handle Annotations
+ *
+ * This module contains the code to parse Annotation entries
+ * based on the Annotation specification (see
+ * http://www.w3.org/2001/Annotea/User/Protocol.html).
+ */
+
+/*
+ * AnnotationParser10 constructor. Instantiates a new object of
+ * type AnnotationParser10.
+ *
+ * @constructor
+ * @param  {nsIDOMXMLDocument} aDocument the WebDAV document to parse
+ * @param  {nsIURI}            aBaseURI  the URI of the WebDAV document
+ * @return {WebDAVParser10}
+ */
+function AnnotationParser10(aDocument, aBaseURI) {
+    /* DEBUG */ dump("Yulup:annotationparser10.js:AnnotationParser10(\"" + aDocument + "\", \"" + aBaseURI + "\") invoked\n");
+
+    /* DEBUG */ YulupDebug.ASSERT(aDocument != null);
+    /* DEBUG */ YulupDebug.ASSERT(aBaseURI  != null);
+
+    // Initialize the attributes
+    this.documentDOM = aDocument;
+    this.baseURI     = aBaseURI;
+    this.ioService   = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
+}
+
+AnnotationParser10.prototype = {
+    documentDOM: null,
+    baseURI    : null,
+    ioService  : null,
+
+    /*
+     * Resolve prefixes used in XPath expressions to
+     * namespaces.
+     *
+     * @param  {String} aPrefix a namespace prefix
+     * @return {String} the namespace associated with the passed in prefix
+     */
+    nsResolver: function (aPrefix) {
+        var namespace = null;
+
+        /* DEBUG */ dump("Yulup:annotationparser10.js:AnnotationParser10.nsResolver(\"" + aPrefix + "\") invoked\n");
+
+        // Initialize the namespaces which are used for the Annotation protocol
+        var namespace = {
+            "r": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+            "a": "http://www.w3.org/2000/10/annotation-ns#",
+            "d": "http://purl.org/dc/elements/1.1/",
+            "h": "http://www.w3.org/1999/xx/http#",
+            "xhtml": "http://www.w3.org/1999/xhtml"
+        };
+
+        return namespace[aPrefix] || null;
+    },
+
+
+    /*
+     * Parse Annotation metadata.
+     *
+     * Parse the Annotation metadata, which includes the different Annotations.
+     *
+     * @return {AnnotationList10} returns the internalized representation of a Annotation response
+     */
+    parse: function() {
+        var sitetree     = null;
+        var elemNode     = null;
+        var elemIterator = null;
+        var list     = 0;
+
+        /* DEBUG */ dump("Yulup:annotationparser10.js:AnnotationList10.parse() invoked\n");
+
+        // Create the AnnotationList10 object
+        annotationList = new AnnotationList10();
+
+        // Start the parse process for the first namespace floor of the annotation protocol (r:RDF/r:Description)
+        if (elemNodeIterator = this.documentDOM.evaluate("r:RDF/r:Description", this.documentDOM, this.nsResolver, XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null)) {
+            /* DEBUG */ dump("Yulup:annotationparser10.js:AnnotationParser10.parse: found one or multiple response elements\n");
+
+            // Continue with the parse process until the last element is reached
+            while (elemNode = elemNodeIterator.iterateNext()) {
+                annotationList.description[list++] = this.__parseDescriptionElement(this.documentDOM, elemNode);
+            }
+        }
+
+        return annotationList;
+    },
+
+
+    /*
+     * ParseDecription Element
+     *
+     * Get and return the values of the protocol elements
+     *
+     * @return {AnnotationList10Properties} returns the value of the parsed elements
+     */
+
+    __parseDescriptionElement: function(aDocument, aNode) {
+        var uri = null;
+
+        // Return the value of the matched elements
+        return {
+            title: aDocument.evaluate("d:title/text()", aNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue,
+                uri: ((uri = aDocument.evaluate("a:body/@r:resource", aNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue) != null ? this.ioService.newURI(uri, null, this.baseURI) : null),
+                };
+    },
+
+
+    /*
+     * Parse Annotation content.
+     *
+     * Parse the single Annotation to get the different values (Name, Title, and so on...).
+     *
+     * @return {AnnotationList10} returns the internalized representation of a Annotation response
+     */
+    parseContent: function() {
+        var sitetree     = null;
+        var elemNode     = null;
+        var elemIterator = null;
+        var list     = 0;
+
+        /* DEBUG */ dump("Yulup:annotationparser10.js:AnnotationList10.parse() invoked\n");
+
+        // Create a new AnnotationList10 object
+        annotationList = new AnnotationList10();
+
+        // Start the parse process for the first namespace floor of the annotation protocol (r:RDF/r:Description)
+        if (elemNodeIterator = this.documentDOM.evaluate("r:RDF/r:Description", this.documentDOM, this.nsResolver, XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null)) {
+            /* DEBUG */ dump("Yulup:annotationparser10.js:AnnotationParser10.parse: found one or multiple response elements\n");
+
+            // Continue with the parse process until the last element is reached
+            while (elemNode = elemNodeIterator.iterateNext()) {
+                annotationList.description[list++] = this.__parseContentDescriptionElement(this.documentDOM, elemNode);
+            }
+        }
+
+        return annotationList;
+    },
+
+    /*
+     * ParseDecription Element
+     *
+     * Get and return the values of the protocol elements
+     *
+     * @return {AnnotationList10Properties} returns the value of the parsed elements
+     */
+    __parseContentDescriptionElement: function(aDocument, aNode) {
+        var uri = null;
+
+        return {
+            // Return the value of the matched elements
+            title: aDocument.evaluate("d:title/text()", aNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue,
+                name: aDocument.evaluate("d:creator/text()", aNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue,
+                date: aDocument.evaluate("a:created/text()", aNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue,
+                pointer: aDocument.evaluate("a:context/text()", aNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue,
+                body: aDocument.evaluate("a:body/r:Description/h:Body/xhtml:html/xhtml:body/text()", aNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue,
+                };
+    }
+};
+
+
+/*
+ * Creates the description property array to save the annotation objects
+ */
+function AnnotationList10() {
+    /* DEBUG */ dump("Yulup:annotationparser10.js:AnnotationList10() invoked\n");
+
+    this.description = new Array();
+}
+
+AnnotationList10.prototype = {
+    description: null
+};

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/annotationsidebar/annotationsidebar-overlay.xul
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/content/annotationsidebar/annotationsidebar-overlay.xul	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/annotationsidebar/annotationsidebar-overlay.xul	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+
+<!--
+# ***** BEGIN LICENSE BLOCK *****
+# Copyright 2006 Wyona AG Zurich
+#
+# This file is part of Yulup.
+#
+# Yulup is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# Yulup is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Yulup; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#
+# ***** END LICENSE BLOCK *****
+-->
+
+<!--
+ * @author Florian Fricker
+ *
+ * This file includes the XUL code for the Annotation overlay menu window.
+ * The file gets loaded by the yulup menu propertie file.
+ *
+-->
+
+<!-- Load the dtd xml file for language support -->
+<!DOCTYPE overlay SYSTEM "chrome://yulup/locale/annotationsidebar.dtd">
+
+<!-- Load the overlay element -->
+<overlay id="uiYulupAnnotationSidebarOverlay"
+         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+  <!-- Handle the annotation popup menue -->
+  <menupopup id="viewSidebarMenu">
+    <menuitem key="key_openYulupAnnotationSidebar" observes="uiOpenYulupAnnotationSidebar"/>
+  </menupopup>
+
+  <!-- Set the hotkey for the sidebar -->
+  <keyset id="mainKeyset">
+    <key id="key_openYulupAnnotationSidebar"
+         key="&openYulupAnnotationSidebar.key;"
+         modifiers="&openYulupAnnotationSidebar.modifiers;"
+         command="uiOpenYulupAnnotationSidebar"/>
+  </keyset>
+
+  <!-- Initialize the broadcaster and import the Annotation-Sidebar interface -->
+  <broadcasterset id="mainBroadcasterSet">
+    <broadcaster id="uiOpenYulupAnnotationSidebar"
+                 label="&annotationSidebarPage.title;"
+                 autoCheck="false"
+                 type="checkbox"
+                 group="sidebar"
+                 sidebarurl="chrome://yulup/content/annotationsidebar/annotationsidebar.xul"
+                 sidebartitle="&annotationSidebarPage.title;"
+                 oncommand="toggleSidebar('uiOpenYulupAnnotationSidebar');"
+                 disabled="true"/>
+  </broadcasterset>
+</overlay>

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/annotationsidebar/annotationsidebar.js
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/content/annotationsidebar/annotationsidebar.js	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/annotationsidebar/annotationsidebar.js	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,439 @@
+/*
+ * ***** BEGIN LICENSE BLOCK *****
+ * Copyright 2006 Wyona AG Zurich
+ *
+ * This file is part of Yulup.
+ *
+ * Yulup is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Yulup is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Yulup; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * ***** END LICENSE BLOCK *****
+ */
+
+/**
+ * @author Florian Fricker
+ *
+ * This file implements the AnnotationSidebar class. The
+ * AnnotationSidebar class, receive the annotation from
+ * the server and add them to the sidebar.
+ *
+ */
+
+var AnnotationSidebar = {
+    __init: false,
+
+    sidebar          : null,
+    mainBrowserWindow: null,
+    currentSelection : null,
+    annotationContent: null,
+
+    /**
+     * Initialize the sidebar.
+     *
+     * @return {Undefined} does not have a return value
+     */
+    onLoadListener: function () {
+        var appIntrospection  = null;
+
+        AnnotationSidebar.__init = true;
+
+        // Create new Array for pushing the AnnotationContent objects
+        AnnotationSidebar.annotationContent = new Array();
+
+        // Get the event handler for the tree view
+        document.getElementById("uiYulupAnnotationSidebarFeedEntriesTree").addEventListener("select", AnnotationSidebar.treeChangeEventListener, false);
+
+        /* DEBUG */ dump("Yulup:annotationsidebar.js:AnnotationSidebar.onLoadListener() invoked\n");
+
+        // Get a handle on the main browser window
+        AnnotationSidebar.mainBrowserWindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
+        .getInterface(Components.interfaces.nsIWebNavigation)
+        .QueryInterface(Components.interfaces.nsIDocShellTreeItem)
+        .rootTreeItem
+        .QueryInterface(Components.interfaces.nsIInterfaceRequestor)
+        .getInterface(Components.interfaces.nsIDOMWindow);
+
+        // Retrieve neutron introspection document from Yulup, if available
+        neutronIntrospection = AnnotationSidebar.mainBrowserWindow.yulup.currentNeutronIntrospection;
+
+        // Get the sidebar element
+        AnnotationSidebar.sidebar = document.getElementById("uiYulupAnnotationSidebarPage");
+
+        // Check if introspection is available
+        if(neutronIntrospection) {
+
+            // Create the final URI for receiving the Annotation metadata
+            var annotationQueryURI = neutronIntrospection.annotation.uri.spec + "?w3c_annotates=" + neutronIntrospection.associatedWithURI.spec;
+
+            // Create context object for the network-service process
+            var context = { uri: Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService).newURI(annotationQueryURI, null, null) };
+
+            // Start the http request to get the Annotation metadata
+            NetworkService.httpRequestGET(annotationQueryURI, null, this.__requestFinishedHandler, context, false, true, null);
+
+        }
+
+    },
+
+    /*
+     * This function implements the finish handler for
+     * the http request, which receive the metadata
+     * from the server.
+     *
+     * @return {Undefined} does not have a return value
+     */
+    __requestFinishedHandler: function (aDocumentData, aResponseStatusCode, aContext, aResponseHeaders, aException) {
+
+        /* DEBUG */ dump("Yulup:document.js:Document.__requestFinishedHandler() invoked\n");
+
+        /* DEBUG */ YulupDebug.ASSERT(aResponseStatusCode != null);
+
+        // Check if the status code was successful
+        if (aResponseStatusCode == 200) {
+
+            /* DEBUG */ dump("Single Annotation: " + aDocumentData);
+
+            // Create a DOM parser element
+            domParser = Components.classes["@mozilla.org/xmlextras/domparser;1"].createInstance(Components.interfaces.nsIDOMParser);
+
+            // Create a DOM document
+            domDocument  = domParser.parseFromString(aDocumentData, "text/xml");
+
+            // Parse the metadata document
+            var annotationList = (new AnnotationParser10(domDocument, aContext.uri)).parse();
+
+            // Create a new tree view object with the metadata elements (We just use the title element)
+            var annotationTreeView = new AnnotationTreeView(annotationList);
+
+            // Get the tree element
+            document.getElementById("uiYulupAnnotationSidebarFeedEntriesTree").view = annotationTreeView;
+
+            // Select a index of the tree element
+            document.getElementById("uiYulupAnnotationSidebarContentDeck").selectedIndex = 0;
+
+            // Create a counter for the iteration process
+            var counter = 0;
+
+            // Start a new http request for each single Annotation in the metadata file
+            while(annotationList.description.length != counter)
+                {
+                    if(annotationList.description[counter].uri) {
+                        // Create a new context for the network service (Note: Each request needs a own context object)
+                        var context = { uri: Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService).newURI(annotationList.description[counter].uri.spec, null, null), index: counter };
+
+                        // Start the http get request with the uri out of the metadata file
+                        NetworkService.httpRequestGET(annotationList.description[counter].uri.spec, null, AnnotationSidebar.__requestFinishedHandlerContent, context, false, true, null);
+                    }
+
+                    // Counter needs to be pushed up that we can check how many request are necessary
+                    counter++;
+                }
+
+
+        }
+        else
+            {
+                // A popup appears if the request for the metadata failed
+                alert("Annotation could not be received. Pleas check your internet settings!");
+            }
+
+    },
+
+    /*
+     * This function implements the finish handler for
+     * the http request, which receive the singe Annotation
+     * from the server.
+     *
+     * @return {Undefined} does not have a return value
+     */
+    __requestFinishedHandlerContent: function (aDocumentData, aResponseStatusCode, aContext, aResponseHeaders, aException) {
+        aResponseStatusCode
+        // Check if the status code was successful
+        if (aResponseStatusCode == 200) {
+
+            // Create a new DOM parser element
+            domParser = Components.classes["@mozilla.org/xmlextras/domparser;1"].createInstance(Components.interfaces.nsIDOMParser);
+
+            // Create a new DOM document
+            domDocument = domParser.parseFromString(aDocumentData, "text/xml");
+
+            // Parse the single Annotation content
+            AnnotationSidebar.annotationContent[aContext.index] = ((new AnnotationParser10(domDocument, aContext.uri)).parseContent());
+
+        }
+        else
+            {
+                // A popup appears if the request for the metadata failed
+                alert("Annotation could not be received. Pleas check your internet settings!");
+            }
+    },
+
+
+    /*
+     * This function implements the event listener for
+     * the tree element. Every time the user select a
+     * new element in the tree, the Annotation should
+     * be changed.
+     *
+     * @return {Undefined} does not have a return value
+     */
+    treeChangeEventListener: function (annotationContent) {
+
+        // Get the current tree index
+        var index = document.getElementById("uiYulupAnnotationSidebarFeedEntriesTree").currentIndex;
+
+        // Check if a index is selected and a Annotation on selected index available
+        if(index != -1 && AnnotationSidebar.annotationContent[index])
+            {
+                // Check if properties are ovailable on selected annotationContent object
+                if(AnnotationSidebar.annotationContent[index].description[0].name && AnnotationSidebar.annotationContent[index].description[0].title &&
+                   AnnotationSidebar.annotationContent[index].description[0].date && AnnotationSidebar.annotationContent[index].description[0].body) {
+
+                    // Set the label to the current Annotation. The tree index has the same value as the position of the Annotation in the array.
+                    document.getElementById("uiYulupAnnotationSidebarDeckName").value = AnnotationSidebar.annotationContent[index].description[0].name;
+                    document.getElementById("uiYulupAnnotationSidebarDeckTitle").value = AnnotationSidebar.annotationContent[index].description[0].title;
+                    document.getElementById("uiYulupAnnotationSidebarDeckDate").value = AnnotationSidebar.annotationContent[index].description[0].date;
+                    document.getElementById("uiYulupAnnotationSidebarDeckBody").value = AnnotationSidebar.annotationContent[index].description[0].body;
+                }
+            }
+
+        // Remove old range on browser window
+        AnnotationSidebar.mainBrowserWindow.getBrowser().contentWindow.getSelection().removeAllRanges();
+
+        // Get the Xpointer
+        var xpointer = AnnotationSidebar.annotationContent[index].description[0].pointer;
+
+        // Fetch the content of the browser window
+        var pageContent = AnnotationSidebar.mainBrowserWindow.getBrowser().contentDocument;
+
+        // Create a new range object
+        var pageRange = pageContent.createRange();
+
+        // Set the root element of the page content
+        pageRange.selectNodeContents(pageContent.documentElement);
+
+        // Create new instance of NsIfind
+        rangeFind = Components.classes["@mozilla.org/embedcomp/rangefind;1"].createInstance().QueryInterface(Components.interfaces.nsIFind);
+
+        // Set the start range
+        var startRange = pageContent.createRange();
+        startRange.setStart(pageRange.startContainer, pageRange.startOffset);
+        startRange.setEnd(pageRange.startContainer, pageRange.startOffset);
+
+        // Set the end range
+        var endRange = pageContent.createRange();
+        endRange.setStart(pageRange.endContainer, pageRange.endOffset);
+        endRange.setEnd(pageRange.endContainer, pageRange.endOffset);
+
+        // Split the Xpointer to get the string element
+        xpointer = xpointer.split('"');
+        xpointer = xpointer[1].split('"')[0];
+
+        // Check if the xpointer can be solved on the current document
+        if((findRange = rangeFind.Find(xpointer, pageRange, startRange, endRange)) == null)
+            {
+                // Show a alert popup when the xpointer points to the wrong place
+                alert("Xpointer could not point into document");
+            }
+
+        // Add the range to the browser window
+        AnnotationSidebar.mainBrowserWindow.getBrowser().contentWindow.getSelection().addRange(findRange);
+
+    },
+
+    /**
+     * Cleanup the sidebar.
+     *
+     * @return {Undefined} does not have a return value
+     */
+    onUnloadListener: function () {
+        // Unload actions can be implemented in this functions
+    }
+};
+
+
+
+/*
+ * AnnotationTreeView constructor. Instantiates a new object of
+ * type AnnotationTreeView.
+ *
+ * @constructor
+ * @param  {AnnotationList} aAnnotationList the Annotation list to show in this view
+ *
+ */
+function AnnotationTreeView(aAnnotationList) {
+
+    /* DEBUG */ dump("Yulup:annotationsidebar.js:AnnotationTreeView(\"" + aAnnotationList + "\") invoked\n");
+
+    // Create and initialize the tree view
+    this.annotationList = aAnnotationList;
+    this.rowCount = aAnnotationList.description.length;
+
+    /* DEBUG */ dump("Yulup:annotationsidebar.js:AnnotationTreeView: this.rowCount = \"" + this.rowCount + "\"\n");
+}
+
+/*
+ * AnnotationTreeView prototype operates the
+ * tree view element with different features.
+ *
+ */
+AnnotationTreeView.prototype = {
+    annotationList   : null,
+    treeBoxObject    : null,
+    rowCount         : null,
+
+    /*
+     * Get the text for a given cell.
+     *
+     * @return {null} return the null statement
+     */
+    getCellText: function (aRow, aColumn) {
+
+        // Check if ColumnID matched witch the title Column
+        if (aColumn.id == "titleColumn")
+            return this.annotationList.description[aRow].title;
+        else
+            return null;
+    },
+
+    /*
+     * Link the view to the front end box object.
+     *
+     * @return {Undefined} does not have a return value
+     */
+    setTree: function (aTreeBoxObject) {
+
+        this.treeBoxObject = aTreeBoxObject;
+    },
+
+    /*
+     * Those function needs to be implemented for the tree view
+     * interface. We don't need them to display the Annotations.
+     * (http://www.xulplanet.com/references/xpcomref/ifaces/nsITreeView.html)
+     */
+    canDrop: function (aRow, aOrientation) {
+
+    },
+
+    cycleCell: function (aRow, aColumn) {
+
+    },
+
+    cycleHeader: function (aColumn) {
+
+    },
+
+    drop: function (aRow, aOrientation) {
+
+    },
+
+    getCellProperties: function (aRow, aColumn, aProperties) {
+
+    },
+
+    getCellValue: function (aRow, aColumn) {
+
+        return null;
+    },
+
+    getColumnProperties: function (aColumn, aProperties) {
+
+    },
+
+    getImageSrc: function (aRow, aColumn) {
+
+        return null;
+    },
+
+    getLevel: function (aRow) {
+
+        return 0;
+    },
+
+    getParentIndex: function (aRow) {
+
+        return -1;
+    },
+
+    getProgressMode: function (aRow, aColumn) {
+
+        return Components.interfaces.nsITreeView.PROGRESS_UNDETERMINED;
+    },
+
+    getRowProperties: function (aRow, aProperties) {
+
+    },
+
+    hasNextSibling: function (aRow, aAfterRowIndex) {
+
+    },
+
+    isContainer: function (aRow) {
+
+        return false;
+    },
+
+    isContainerEmpty: function (aRow) {
+
+        return false;
+    },
+
+    isContainerOpen: function (aRow) {
+
+        return false;
+    },
+
+    isEditable: function (aRow, aColumn) {
+
+        return false;
+    },
+
+    isSeparator: function (aRow) {
+
+        return false;
+    },
+
+    isSorted: function () {
+
+        return false;
+    },
+
+    performAction: function (aAction) {
+
+    },
+
+    performActionOnCell: function (aAction, aRow, aColumn) {
+
+    },
+
+    performActionOnRow: function (aAction, aRow, aColumn) {
+
+    },
+
+    selectionChanged: function () {
+
+    },
+
+    setCellText: function (aRow, aColumn, aText) {
+
+    },
+
+    setCellValue: function (aRow, aColumn, aValue) {
+
+    },
+
+    toggleOpenState: function (aRow) {
+
+    }
+};

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/annotationsidebar/annotationsidebar.xul
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/content/annotationsidebar/annotationsidebar.xul	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/annotationsidebar/annotationsidebar.xul	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,143 @@
+<?xml version="1.0"?>
+
+<!--
+# ***** BEGIN LICENSE BLOCK *****
+# Copyright 2006 Wyona AG Zurich
+#
+# This file is part of Yulup.
+#
+# Yulup is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# Yulup is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Yulup; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#
+# ***** END LICENSE BLOCK *****
+-->
+
+<!--
+ * @author Florian Fricker
+ *
+ * This file includes the XUL code for the Annotation sidebar.
+ * The file gets loaded by the AnnotationSidebar-overlay file.
+ *
+-->
+
+<!-- Load the css to formate the AnnotationSidebar -->
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<?xml-stylesheet href="chrome://yulup/skin/annotationsidebar.css" type="text/css"?>
+
+<!-- Load the dtd xml file for language support -->
+<!DOCTYPE page SYSTEM "chrome://yulup/locale/annotationsidebar.dtd">
+
+<!-- Initialize the SidebarPage and add some listener for load and unload the sidebar -->
+<page id="uiYulupAnnotationSidebarPage"
+      title="&annotationSidebarPage.title;"
+      onload="AnnotationSidebar.onLoadListener()"
+      onunload="AnnotationSidebar.onUnloadListener()"
+      xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
+
+  <!-- Add some special name-labels to the sidebar (AtomSidebar standart) -->
+  <stringbundle id="uiYulupAnnotationSidebarStringbundle" src="chrome://yulup/locale/annotationsidebar.properties"/>
+
+  <!-- Load some some Java-Script files to add the required classes -->
+  <script type="application/x-javascript"
+          src="chrome://yulup/content/common.js"/>
+  <script type="application/x-javascript"
+          src="chrome://yulup/content/neutron.js"/>
+  <script type="application/x-javascript"
+          src="chrome://yulup/content/annotationsidebar/annotationsidebar.js"/>
+  <script type="application/x-javascript"
+          src="chrome://yulup/content/networkservice.js"/>
+  <script type="application/x-javascript"
+          src="chrome://yulup/content/annotationparser10.js"/>
+
+  <!-- Build the sidebar deck -->
+  <deck id="uiYulupAnnotationSidebarContentDeck" selectedIndex="1" orient="vertical" align="stretch" flex="1">
+    <vbox flex="1">
+
+      <!-- Display the deck with a preloader (Note: throbber is not implemented yet) -->
+      <deck id="uiYulupAnnotationSidebarDeck"
+            onselect="if (this.selectedIndex != 2) { document.getElementById('uiYulupAnnotationSidebarFeedLoadingThrobber').removeAttribute('busy'); }"
+            selectedIndex="0"
+            orient="vertical"
+            align="stretch"
+            flex="1">
+
+        <!-- Cretate the labels to display the annotation ifnormation -->
+        <vbox stretch="align" flex="1">
+          <groupbox flex="1">
+            <caption label="&annotationSidebarFeedInfoGroupbox.label;" style="font-size: x-small;"/>
+
+            <label id="uiYulupAnnotationSidebarDeckTitleLabel" value="&annotationSidebarContentTitle.label;"/>
+            <label id="uiYulupAnnotationSidebarDeckTitle"/>
+            <label value=""/>
+
+            <label id="uiYulupAnnotationSidebarDeckNameLabel" value="&annotationSidebarContentName.label;"/>
+            <label id="uiYulupAnnotationSidebarDeckName"/>
+            <label value=""/>
+
+            <label id="uiYulupAnnotationSidebarDeckDateLabel" value="&annotationSidebarContentDate.label;"/>
+            <label id="uiYulupAnnotationSidebarDeckDate"/>
+            <label value=""/>
+
+            <label id="uiYulupAnnotationSidebarDeckBodyLabel" value="&annotationSidebarContentBody.label;"/>
+            <label id="uiYulupAnnotationSidebarDeckBody"/>
+
+
+          </groupbox>
+
+          <!-- Split the sidebar in tow pieces -->
+          <splitter/>
+
+          <!-- Create a groupbox for showing the tree view -->
+          <groupbox flex="2">
+            <caption label="&annotationSidebarFeedEntriesGroupbox.label;" style="font-size: x-small;"/>
+
+            <deck id="uiYulupAnnotationSidebarFeedEntriesDeck" selectedIndex="0" orient="vertical" align="stretch" flex="1">
+
+              <tree id="uiYulupAnnotationSidebarFeedEntriesTree"
+                    enableColumnDrag="false"
+                    hidecolumnpicker="true"
+                    seltype="single"
+                    flex="1">
+                <treecols>
+                  <treecol id="titleColumn" label="&annotationSidebarFeedEntriesTreeColumnTitle.label;" flex="1"/>
+                </treecols>
+                <treechildren context="uiYulupAnnotationSidebarFeedEntriesContextMenu"/>
+              </tree>
+
+              <!-- Add diverent labels to the "in groupbox" tree element -->
+              <vbox>
+                <spacer align="stretch" flex="1"/>
+                <description class="uiYulupAnnotationSidebarFeedError">
+                  &annotationSidebarFeedEntriesDescription.label;
+                </description>
+                <spacer align="stretch" flex="1"/>
+              </vbox>
+            </deck>
+
+          </groupbox>
+
+        </vbox>
+
+        <!-- Add diverent labels to the "out groupbox" sidebar element -->
+        <groupbox align="stretch" flex="1">
+          <spacer align="stretch" flex="1"/>
+          <description class="uiYulupAnnotationSidebarFeedError">
+            &annotationSidebarDescriptionNoFeed.label;
+          </description>
+          <spacer align="stretch" flex="1"/>
+        </groupbox>
+      </deck>
+    </vbox>
+  </deck>
+</page>

Modified: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/neutron.js
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/content/neutron.js	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/neutron.js	2007-02-28 15:17:33 UTC (rev 23031)
@@ -27,6 +27,11 @@
  * This module contains the code to communicate with a CMS
  * supporting the Neutron specification (see
  * http://www.wyona.org/osr-101/osr-101.xhtml).
+ *
+ * @author Fricker Florian
+ *
+ * Update:
+ * Add the annotation uri attribute to the object string
  */
 
 const NEUTRON_10_NAMESPACE = "http://www.wyona.org/neutron/1.0";
@@ -193,13 +198,13 @@
 
         // extract Neutron version
         switch (aDocument.documentElement.namespaceURI) {
-            case NEUTRON_10_NAMESPACE:
-                // instantiate Neutron 1.0 parser
-                neutronParser = new NeutronParser10(aDocument, aBaseURI);
-                break;
-            default:
-                // no parser available for this version
-                throw new NeutronException("Yulup:neutron.js:Neutron.parserFactory: Neutron version \"" + aDocument.documentElement.namespaceURI + "\" not supported.");
+        case NEUTRON_10_NAMESPACE:
+            // instantiate Neutron 1.0 parser
+            neutronParser = new NeutronParser10(aDocument, aBaseURI);
+            break;
+        default:
+            // no parser available for this version
+            throw new NeutronException("Yulup:neutron.js:Neutron.parserFactory: Neutron version \"" + aDocument.documentElement.namespaceURI + "\" not supported.");
         }
 
         return neutronParser;
@@ -667,18 +672,18 @@
                     }
                     if (this.fragments[i].widgets[j].attributes) {
                         objString += "Widget attributes: \n"
-                        for (var name in this.fragments[i].widgets[j].attributes) {
-                            objString += name + "=";
-                            objString += this.fragments[i].widgets[j].attributes[name] + "\n";
-                        }
+                            for (var name in this.fragments[i].widgets[j].attributes) {
+                                objString += name + "=";
+                                objString += this.fragments[i].widgets[j].attributes[name] + "\n";
+                            }
                     }
 
                     if (this.fragments[i].widgets[j].fragmentAttributes) {
                         objString += "Fragment attributes: \n"
-                        for (var k=0; k < this.fragments[i].widgets[j].fragmentAttributes.length; k++) {
-                            objString += this.fragments[i].widgets[j].fragmentAttributes[k].name + " ";
-                            objString += this.fragments[i].widgets[j].fragmentAttributes[k].xpath + "\n";
-                        }
+                            for (var k=0; k < this.fragments[i].widgets[j].fragmentAttributes.length; k++) {
+                                objString += this.fragments[i].widgets[j].fragmentAttributes[k].name + " ";
+                                objString += this.fragments[i].widgets[j].fragmentAttributes[k].xpath + "\n";
+                            }
                     }
 
                     if (this.fragments[i].widgets[j].fragment) {
@@ -698,6 +703,12 @@
             }
         }
 
+        // Build the Annotation object string to include the URI of the Annotation server
+        objString += "Annotation: \n";
+        if (this.annotation) {
+            objString += "Annotation URI:         " + (this.annotation.uri ? this.annotation.uri.spec : this.annotation.uri) + "\n";
+        }
+
         return objString + "\n";
     }
 };

Modified: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/neutronparser10.js
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/content/neutronparser10.js	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/neutronparser10.js	2007-02-28 15:17:33 UTC (rev 23031)
@@ -27,6 +27,12 @@
  * This module contains the code to parse files
  * based on the Neutron specification (see
  * http://www.wyona.org/osr-101/osr-101.xhtml).
+ *
+ * @author Florian Fricker
+ *
+ * Update:
+ * Add the annotation element to the neutron parser
+ *
  */
 
 /**
@@ -105,8 +111,8 @@
 
         return {
             href: ((uri = aDocument.evaluate("D:href/text()", aNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue) != null ? this.ioService.newURI(uri, null, this.baseURI) : null),
-            properties: this.__parseProperties(aDocument, aNode)
-        };
+                properties: this.__parseProperties(aDocument, aNode)
+                };
     },
 
     __parseProperties: function(aDocument, aNode) {
@@ -166,6 +172,11 @@
             // navigation element exists
             introspection.navigation = this.__parseNavigation(this.documentDOM, elemNode);
         }
+        // parse annotation element out of the intospection file
+        if (elemNode = this.documentDOM.evaluate("neutron10:introspection/neutron10:annotation", this.documentDOM, this.nsResolver, XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null).iterateNext()) {
+            // if the annotation element exists, the introspection.annotation flag is set to the intospection value
+            introspection.annotation = this.__parseAnnotation(this.documentDOM, elemNode);
+        }
 
         return introspection;
     },
@@ -191,22 +202,22 @@
             exceptionType = this.documentDOM.evaluate("attribute::type", elemNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue;
 
             switch (exceptionType) {
-                case "checkin":
-                    response = new NeutronProtocolCheckinException(this.documentDOM.evaluate("neutron10:message/text()", elemNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue);
+            case "checkin":
+                response = new NeutronProtocolCheckinException(this.documentDOM.evaluate("neutron10:message/text()", elemNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue);
 
-                    // TODO: implement parsing of the remaining fields
-                    break;
-                case "data-not-well-formed":
-                    response = new NeutronProtocolDataNotWellFormedException(this.documentDOM.evaluate("neutron10:message/text()", elemNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue);
+                // TODO: implement parsing of the remaining fields
+                break;
+            case "data-not-well-formed":
+                response = new NeutronProtocolDataNotWellFormedException(this.documentDOM.evaluate("neutron10:message/text()", elemNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue);
 
-                    if (elemNode = this.documentDOM.evaluate("neutron10:data-not-well-formed", elemNode, this.nsResolver, XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null).iterateNext()) {
-                        response.url        = this.documentDOM.evaluate("attribute::url", elemNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue;
-                        response.lineNumber = this.documentDOM.evaluate("neutron10:line/attribute::number", elemNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue;
-                        response.error      = this.documentDOM.evaluate("neutron10:line/attribute::message", elemNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue;
-                    }
-                    break;
-                default:
-                    response = new NeutronProtocolException(this.documentDOM.evaluate("neutron10:message/text()", elemNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue);
+                if (elemNode = this.documentDOM.evaluate("neutron10:data-not-well-formed", elemNode, this.nsResolver, XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null).iterateNext()) {
+                    response.url        = this.documentDOM.evaluate("attribute::url", elemNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue;
+                    response.lineNumber = this.documentDOM.evaluate("neutron10:line/attribute::number", elemNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue;
+                    response.error      = this.documentDOM.evaluate("neutron10:line/attribute::message", elemNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue;
+                }
+                break;
+            default:
+                response = new NeutronProtocolException(this.documentDOM.evaluate("neutron10:message/text()", elemNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue);
             }
 
             /* Because this message is of type exception, we
@@ -224,17 +235,25 @@
 
         return {
             uri: ((uri = aDocument.evaluate("attribute::uri", aNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue) != "" ? this.ioService.newURI(uri, null, this.baseURI) : null),
-            templates: this.__parseTemplates(aDocument, aNode)
-        };
+                templates: this.__parseTemplates(aDocument, aNode)
+                };
     },
 
     __parseNavigation: function(aDocument, aNode) {
 
         return {
-          sitetree: this.__parseSitetree(aDocument, aNode)
+            sitetree: this.__parseSitetree(aDocument, aNode)
         };
     },
 
+    __parseAnnotation: function(aDocument, aNode) {
+        // Return the uri of the annotation server as uri object
+        return {
+            uri: ((uri = aDocument.evaluate("attribute::url", aNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue) != "" ? this.ioService.newURI(uri, null, this.baseURI) : null),
+        };
+    },
+
+
     __parseSitetree: function(aDocument, aNode) {
         var sitetree = null;
         var uri      = null;
@@ -244,8 +263,8 @@
         if (sitetree) {
             return {
                 uri: ((uri = aDocument.evaluate("attribute::href", sitetree, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue) != "" ? this.ioService.newURI(uri, null, this.baseURI) : null),
-                method: aDocument.evaluate("attribute::method", sitetree, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue
-            };
+                    method: aDocument.evaluate("attribute::method", sitetree, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue
+                    };
         } else {
             return null;
         }
@@ -276,16 +295,16 @@
 
         return {
             mimeType: aDocument.evaluate("attribute::mime-type", aNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue,
-            templateWidgets: ((templateWidgets = aDocument.evaluate("neutron10:widgets/attribute::templates", aNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue) == "false" ? false : true),
-            open:     this.__parseFileOperation(aDocument, aNode, "open"),
-            save:     this.__parseFileOperation(aDocument, aNode, "save"),
-            checkout: this.__parseFileOperation(aDocument, aNode, "checkout"),
-            checkin:  this.__parseFileOperation(aDocument, aNode, "checkin"),
-            schemas:  this.__parseSchemas(aDocument, aNode),
-            styles:   this.__parseStyles(aDocument, aNode),
-            styleTemplate: this.__parseStyleTemplate(aDocument, aNode),
-            widgets:  this.__parseWidgets(aDocument, aNode)
-        };
+                templateWidgets: ((templateWidgets = aDocument.evaluate("neutron10:widgets/attribute::templates", aNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue) == "false" ? false : true),
+                open:     this.__parseFileOperation(aDocument, aNode, "open"),
+                save:     this.__parseFileOperation(aDocument, aNode, "save"),
+                checkout: this.__parseFileOperation(aDocument, aNode, "checkout"),
+                checkin:  this.__parseFileOperation(aDocument, aNode, "checkin"),
+                schemas:  this.__parseSchemas(aDocument, aNode),
+                styles:   this.__parseStyles(aDocument, aNode),
+                styleTemplate: this.__parseStyleTemplate(aDocument, aNode),
+                widgets:  this.__parseWidgets(aDocument, aNode)
+                };
     },
 
     __parseFileOperation: function (aDocument, aNode, aOperation) {
@@ -303,8 +322,8 @@
 
         return {
             uri:    sourceURI,
-            method: aDocument.evaluate("neutron10:" + aOperation + "/attribute::method", aNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue
-        };
+                method: aDocument.evaluate("neutron10:" + aOperation + "/attribute::method", aNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue
+                };
     },
 
     __parseSchemas: function (aDocument, aNode) {
@@ -350,14 +369,14 @@
 
         var href = aDocument.evaluate("neutron10:styles/neutron10:style-template/attribute::href", aNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue;
         if (href != "") {
-           styleTemplate.uri = this.ioService.newURI(href, null, this.baseURI);
+            styleTemplate.uri = this.ioService.newURI(href, null, this.baseURI);
             // apply styleTemplate pre or post source transformation
             var mode = aDocument.evaluate("neutron10:styles/neutron10:style-template/attribute::mode", aNode, this.nsResolver, XPathResult.STRING_TYPE, null).stringValue;
             if (mode != "") {
-              styleTemplate.mode = mode;
+                styleTemplate.mode = mode;
             }
 
-           return styleTemplate;
+            return styleTemplate;
         }
         return null;
     },

Modified: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/yulup.js
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/content/yulup.js	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/yulup.js	2007-02-28 15:17:33 UTC (rev 23031)
@@ -24,10 +24,12 @@
 /**
  * @author Andreas Wuest
  * @author Gregor Imboden
+ * @author Florian Fricker
  *
  */
 
 const YULUP_EDITOR_CHROME_URI      = "chrome://yulup/content/editor/editor.xul";
+const YULUP_ANNOTATION_CHROME_URI  = "chrome://yulup/content/annotationdialog.xul";
 const YULUP_ABOUT_CHROME_URI       = "chrome://yulup/content/about.xul";
 const YULUP_PREFERENCES_CHROME_URI = "chrome://yulup/content/preferences/preferences.xul";
 const YULUP_WS_WIZARD_CHROME_URI   = "chrome://yulup/content/wizards/workspacewizard.xul";
@@ -69,6 +71,7 @@
     yulupOperationNewFromTemplateLocalMenu     : null,
     yulupOperationNewFromTemplateLocalMenupopup: null,
     yulupOpenAtomSidebarObserver               : null,
+    yulupOpenAnnotationSidebarObserver         : null,
 
     /**
      * Event handler for setting up Yulup for the active browser window.
@@ -116,6 +119,7 @@
         this.yulupOperationNewFromTemplateLocalMenupopup = document.getElementById("uiYulupOperationNewFromTemplateLocalMenupopup");
         this.uiYulupEditMenupopup                        = document.getElementById("uiYulupEditMenupopup");
         this.yulupOpenAtomSidebarObserver                = document.getElementById("uiOpenYulupAtomSidebar");
+        this.yulupOpenAnnotationSidebarObserver          = document.getElementById("uiOpenYulupAnnotationSidebar");
         this.yulupDocument                               = document;
 
         this.yulupEditMenu.setAttribute("disabled", "false");
@@ -481,6 +485,66 @@
         return true;
     },
 
+    /**
+     * Opens the Annotation dialog instance and waits until
+     * the Annotation protocol is returned. Then it sends
+     * the protocol to the Annotation URI over a http post
+     * request.
+     *
+     * @return {Boolean} return true on success, otherwise false
+     */
+    createNewAnnotationEntry: function () {
+
+        var retValue = {content: null};
+
+        // Check if a valid part of text is selected
+        if(self.getBrowser().contentWindow.getSelection().toString())
+            {
+                // Opens the Annotation dialog window (annotationdialog.xul)
+                window.openDialog(YULUP_ANNOTATION_CHROME_URI, "yulupAnnotationDialog", "chrome,resizable=yes,centerscreen,modal=yes", self.getBrowser().contentWindow, retValue);
+
+                // Check if we have a return value from the Annotation class
+                if(retValue.content)
+                    // Sends the Annotation protocol to the Annotation URI
+                    NetworkService.httpRequestPUT(this.currentNeutronIntrospection.annotation.uri.spec, null, retValue.content, "application/xml", this.annotationRequestFinishedHandler, null, false, true, null)
+                        }
+        // Display a alert message when no text was selectd by the user
+        else
+            {
+                // TODO: i18n
+                alert("Please make sure that your text passage is selected correctly!");
+            }
+
+    },
+
+    /**
+     * Implements the http finish handler of
+     * the annotation request.
+     *
+     * @return {Boolean} return true on success, otherwise false
+     */
+    annotationRequestFinishedHandler: function (aDocumentData, aResponseStatusCode, aContext, aResponseHeaders, aException) {
+
+        /* DEBUG */ dump("Yulup:document.js:Document.__requestFinishedHandler() invoked\n");
+
+        /* DEBUG */ YulupDebug.ASSERT(aResponseStatusCode != null);
+
+        // Check if the request was successful
+        if (aResponseStatusCode == 200) {
+            // TODO: i18n
+            alert("Annotation has been saved!");
+            return true;
+        }
+        // In case of a failed request a popup appears
+        else
+            {
+                // TODO: i18n
+                alert("Annotation could not be saved. Pleas check your internet settings!");
+                return false;
+            }
+    },
+
+
     openYulupPreferences: function () {
         var instantApply = null;
         var features     = null;
@@ -845,10 +909,26 @@
                     this.yulupEditMenu.removeAttribute("tooltip");
                     this.yulupEditMenu.setAttribute("tooltiptext", document.getElementById("uiYulupOverlayStringbundle").getString("editToolbarbutton.tooltip"));
 
+                    // If no Annotations available, disbale sidebar opening and lock menu button
+                    if (this.yulupOpenAnnotationSidebarObserver)
+                        // Disable the Annotation sidebar
+                        this.yulupOpenAnnotationSidebarObserver.setAttribute("disabled", true);
+                    // Disable the menu button
+                    document.getElementById("command_yulup_newannotationentry").setAttribute("disabled", true);
+
+
                     // no Atom content available, disable sidebar opening
                     if (this.yulupOpenAtomSidebarObserver)
                         this.yulupOpenAtomSidebarObserver.setAttribute("disabled", true);
 
+                    this.yulupOpenAtomSidebarObserver.setAttribute("disabled", true);
+
+                    // If no Annotation is available, disable sidebar opening and lock the button
+                    if (this.yulupOpenAnnotationSidebarObserver) {
+                        this.yulupOpenAnnotationSidebarObserver.setAttribute("disabled", true);
+                        document.getElementById("command_yulup_newannotationentry").setAttribute("disabled", true);
+                    }
+
                     this.currentState = "none";
                 }
                 break;
@@ -862,6 +942,42 @@
                     this.buildFragmentsMenu(this.currentNeutronIntrospection.queryCheckoutFragments(), this.yulupEditMenuCheckoutMenuitem, this.yulupEditMenuCheckoutMenu, this.yulupEditMenuCheckoutMenupopup, "Yulup.checkoutFromCMS");
                 }
 
+                // Check if the annotation flag and uri is set in the neutron protocol
+                // TODOOOOOOOOOOOOOOOOOOOOOOOO
+                if(this.currentNeutronIntrospection && this.currentNeutronIntrospection.annotation && this.currentNeutronIntrospection.annotation.uri) {
+                    try {
+                        // If the Annotation flag is available, enable the user to open the sidebar
+                        if(this.yulupOpenAnnotationSidebarObserver)
+                            this.yulupOpenAnnotationSidebarObserver.setAttribute("disabled", false);
+
+                        // Check if the Annotation sidebar is already open
+                        if (document.getElementById("sidebar").docShell && document.getElementById("sidebar").contentDocument.getElementById("uiYulupAnnotationSidebarPage")) {
+                            // Reload the Annotation sidebar (annotationsidebar.xul) to start a new Annotation request
+                            document.getElementById("sidebar").contentDocument.getElementById("uiYulupAnnotationSidebarPage").reload();
+                        } else {
+                            // Force Yulup to open the Annotation sideba
+                            toggleSidebar("uiOpenYulupAnnotationSidebar", true);
+                        }
+                    }
+
+                    // Catch an exception and trace it with debug output
+                    catch (exception) {
+                        /* DEBUG */ YulupDebug.dumpExceptionToConsole("Yulup:yulup.js:Yulup.introspectionStateChanged", exception);
+                        /* DEBUG */ Components.utils.reportError(exception);
+                    }
+
+                    // Enable the Annotation entry in the menu (Required to set new Annotation)
+                    document.getElementById("command_yulup_newannotationentry").setAttribute("disabled", false);
+
+
+                } else {
+                    // If the Annotation flag is not set, the sidebar should be disabled
+                    if(this.yulupOpenAnnotationSidebarObserver)
+                        this.yulupOpenAnnotationSidebarObserver.setAttribute("disabled", true);
+                    document.getElementById("command_yulup_newannotationentry").setAttribute("disabled", true);
+                }
+
+
                 if (this.currentAPPIntrospection) {
                     try {
                         // Atom content available, enable user to open the sidebar

Modified: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/yulup.xul
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/content/yulup.xul	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/content/yulup.xul	2007-02-28 15:17:33 UTC (rev 23031)
@@ -63,7 +63,10 @@
   <script type="application/x-javascript" src="chrome://yulup/content/resourceupload.js"/>
   <script type="application/x-javascript" src="chrome://yulup/content/progressdialog.js"/>
   <script type="application/x-javascript" src="chrome://yulup/content/workspaceservice.js"/>
+  <!-- Load the Annotationsidebar into the Yulup framework-->
+  <script type="application/x-javascript" src="chrome://yulup/content/annotationsidebar/annotationsidebar.js"/>
 
+
   <toolbar id="nav-bar">
     <stringbundle id="uiYulupOverlayStringbundle" src="chrome://yulup/locale/yulup.properties"/>
     <stringbundle id="uiYulupAuthStringbundle"    src="chrome://yulup/locale/authentication.properties"/>
@@ -75,6 +78,12 @@
                label="&fileOperationNewAtomEntryMenuitem.label;"
                tooltiptext="&fileOperationNewAtomEntryMenuitem.tooltip;"
                disabled="true"/>
+      <!-- Set the overlay label and command for the Annotation menu entry -->
+      <command id="command_yulup_newannotationentry"
+               oncommand="Yulup.createNewAnnotationEntry()"
+               label="&fileOperationNewAnnotationEntryMenuitem.label;"
+               tooltiptext="&fileOperationNewAnnotationEntryMenuitem.tooltip;"
+               disabled="true"/>
     </commandset>
 
     <popupset>
@@ -144,14 +153,17 @@
           <menupopup id="uiYulupOperationNewMenupopup">
             <menuitem id="uiYulupOperationNewAtomEntryMenuitem"
                       observes="command_yulup_newatomentry"/>
+            <!-- Add the Annotation item to the menu -->
+            <menuitem id="uiYulupOperationNewAnnotationEntryMenuitem"
+                      observes="command_yulup_newannotationentry"/>
             <menuseparator/>
             <menu id="uiYulupOperationNewFromTemplateLocalMenu"
-                      label="&fileOperationNewFromTemplateLocalMenuitem.label;" tooltiptext="&fileOperationNewFromTemplateLocalMenuitem.tooltip;"
-                      disabled="true">
+                  label="&fileOperationNewFromTemplateLocalMenuitem.label;" tooltiptext="&fileOperationNewFromTemplateLocalMenuitem.tooltip;"
+                  disabled="true">
               <menupopup id="uiYulupOperationNewFromTemplateLocalMenupopup"/>
             </menu>
             <menuitem id="uiYulupOperationNewFromTemplateCMSMenuitem"
-                      oncommand="Yulup.yulupCreateNewFromTemplateCMS()"
+                      oncommand="Yulup.createNewFromTemplateCMS()"
                       label="&fileOperationNewFromTemplateCMSMenuitem.label;" tooltiptext="&fileOperationNewFromTemplateCMSMenuitem.tooltip;"
                       disabled="true"/>
           </menupopup>
@@ -176,6 +188,10 @@
 
         <menuitem key="key_openYulupAtomSidebar" observes="uiOpenYulupAtomSidebar"/>
 
+        <!-- Add the hot-key prefix for the Annotationsidebar -->
+        <menuitem key="key_openYulupAnnotationSidebar" observes="uiOpenYulupAnnotationSidebar"/>
+
+
         <menuseparator id="uiYulupRealmSeparator" hidden="true"/>
 
         <menuseparator id="uiYulupExtrasSeparator"/>

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/de/annotation.dtd
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/de/annotation.dtd	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/de/annotation.dtd	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,7 @@
+<!ENTITY annotationDialog.title "Annotation">
+<!ENTITY annotationPointerStringTextbox.label "Absatz">
+<!ENTITY annotationAutorNameStringTextbox.label "Autor">
+<!ENTITY annotationCommentStringTextbox.label "Kommentar">
+<!ENTITY annotationTitleStringTextbox.label "Titel">
+<!ENTITY annotationButtonName.accept "Speichern">
+<!ENTITY annotationButtonName.cancle "Abbrechen">

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/de/annotationsidebar.dtd
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/de/annotationsidebar.dtd	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/de/annotationsidebar.dtd	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,20 @@
+<!ENTITY annotationSidebarPage.title "Kommentar Uebersicht">
+<!ENTITY openYulupAnnotationSidebar.modifiers "shift accel">
+<!ENTITY openYulupAnnotationSidebar.key "J">
+<!ENTITY annotationSidebarFeedInfoGroupbox.label "Annotation Information:">
+<!ENTITY annotationSidebarFirstButton.label "First entry">
+<!ENTITY annotationSidebarPreviousButton.label "Previous entries">
+<!ENTITY annotationSidebarNextButton.label "Next entries">
+<!ENTITY annotationSidebarSearch.label "Search:">
+<!ENTITY annotationSidebarLastButton.label "Last entry">
+<!ENTITY annotationSidebarFeedEntriesGroupbox.label "Annotation Entries:">
+<!ENTITY annotationSidebarFeedEntriesTreeColumnTitle.label "Title">
+<!ENTITY annotationSidebarDescriptionNoFeed.label "This annotation is currently not available">
+<!ENTITY annotationSidebarFeedEntriesDescription.label "No annotation entrys">
+<!ENTITY annotationSidebarDescriptionLoading.label "Loading annotation...">
+<!ENTITY annotationSidebarSearch.accesskey "J">
+<!ENTITY annotationSidebarDescriptionNoContent.label "No annotations available">
+<!ENTITY annotationSidebarContentTitle.label "Titel:">
+<!ENTITY annotationSidebarContentName.label "Autor:">
+<!ENTITY annotationSidebarContentDate.label "Datum:">
+<!ENTITY annotationSidebarContentBody.label "Kommentar:">

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/de/annotationsidebar.properties
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/de/annotationsidebar.properties	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/de/annotationsidebar.properties	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1 @@
+annotationSidebarFeedInformationBoxAuthor.label=Author

Modified: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/de/yulup.dtd
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/de/yulup.dtd	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/de/yulup.dtd	2007-02-28 15:17:33 UTC (rev 23031)
@@ -38,3 +38,5 @@
 <!ENTITY editHelpMenuitem.tooltip "Den Hilfe-Browser von Yulup anzeigen">
 <!ENTITY editDemoMenuitem.tooltip "Zur Demosite gehen">
 <!ENTITY editVersionStringMenuitem.tooltip "Die Version von Yulup die Sie derzeit benützen">
+<!ENTITY fileOperationNewAnnotationEntryMenuitem.label "Kommentar anhaengen">
+<!ENTITY fileOperationNewAnnotationEntryMenuitem.tooltip "Einen neuen Kommentar fuer den ausgewaehlten Text erstellen">

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/en/annotation.dtd
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/en/annotation.dtd	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/en/annotation.dtd	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,7 @@
+<!ENTITY annotationDialog.title "Annotation">
+<!ENTITY annotationPointerStringTextbox.label "Quote">
+<!ENTITY annotationAutorNameStringTextbox.label "Autor">
+<!ENTITY annotationCommentStringTextbox.label "Comment">
+<!ENTITY annotationTitleStringTextbox.label "Subject">
+<!ENTITY annotationButtonName.accept "Save">
+<!ENTITY annotationButtonName.cancle "Cancle">

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/en/annotationsidebar.dtd
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/en/annotationsidebar.dtd	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/en/annotationsidebar.dtd	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,20 @@
+<!ENTITY annotationSidebarPage.title "Annotation Sidebar">
+<!ENTITY openYulupAnnotationSidebar.modifiers "shift accel">
+<!ENTITY openYulupAnnotationSidebar.key "J">
+<!ENTITY annotationSidebarFeedInfoGroupbox.label "Annotation Information:">
+<!ENTITY annotationSidebarFirstButton.label "First entry">
+<!ENTITY annotationSidebarPreviousButton.label "Previous entries">
+<!ENTITY annotationSidebarNextButton.label "Next entries">
+<!ENTITY annotationSidebarSearch.label "Search:">
+<!ENTITY annotationSidebarLastButton.label "Last entry">
+<!ENTITY annotationSidebarFeedEntriesGroupbox.label "Annotation Entries:">
+<!ENTITY annotationSidebarFeedEntriesTreeColumnTitle.label "Title">
+<!ENTITY annotationSidebarDescriptionNoFeed.label "This annotation is currently not available">
+<!ENTITY annotationSidebarFeedEntriesDescription.label "No annotation entrys">
+<!ENTITY annotationSidebarDescriptionLoading.label "Loading annotation...">
+<!ENTITY annotationSidebarSearch.accesskey "J">
+<!ENTITY annotationSidebarDescriptionNoContent.label "No annotations available">
+<!ENTITY annotationSidebarContentTitle.label "Title:">
+<!ENTITY annotationSidebarContentName.label "Author:">
+<!ENTITY annotationSidebarContentDate.label "Date:">
+<!ENTITY annotationSidebarContentBody.label "Annotation:">

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/en/annotationsidebar.properties
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/en/annotationsidebar.properties	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/en/annotationsidebar.properties	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1 @@
+annotationSidebarFeedInformationBoxAuthor.label=Author

Modified: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/en/yulup.dtd
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/en/yulup.dtd	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/en/yulup.dtd	2007-02-28 15:17:33 UTC (rev 23031)
@@ -38,3 +38,5 @@
 <!ENTITY editHelpMenuitem.tooltip "Shows the help browser for Yulup">
 <!ENTITY editDemoMenuitem.tooltip "Takes you to the demo site">
 <!ENTITY editVersionStringMenuitem.tooltip "The version of Yulup you are currently using">
+<!ENTITY fileOperationNewAnnotationEntryMenuitem.label "Set new annotation">
+<!ENTITY fileOperationNewAnnotationEntryMenuitem.tooltip "Create a new annotation entry for the currently selected text">

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/es/annotation.dtd
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/es/annotation.dtd	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/es/annotation.dtd	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,7 @@
+<!ENTITY annotationDialog.title "Annotation">
+<!ENTITY annotationPointerStringTextbox.label "Quote">
+<!ENTITY annotationAutorNameStringTextbox.label "Autor">
+<!ENTITY annotationCommentStringTextbox.label "Comment">
+<!ENTITY annotationTitleStringTextbox.label "Subject">
+<!ENTITY annotationButtonName.accept "Save">
+<!ENTITY annotationButtonName.cancle "Cancle">

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/es/annotationsidebar.dtd
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/es/annotationsidebar.dtd	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/es/annotationsidebar.dtd	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,20 @@
+<!ENTITY annotationSidebarPage.title "Annotation Sidebar">
+<!ENTITY openYulupAnnotationSidebar.modifiers "shift accel">
+<!ENTITY openYulupAnnotationSidebar.key "J">
+<!ENTITY annotationSidebarFeedInfoGroupbox.label "Annotation Information:">
+<!ENTITY annotationSidebarFirstButton.label "Primera entrada">
+<!ENTITY annotationSidebarPreviousButton.label "Entradas previas">
+<!ENTITY annotationSidebarNextButton.label "Entradas siguientes">
+<!ENTITY annotationSidebarSearch.label "Buscar:">
+<!ENTITY annotationSidebarLastButton.label "Última entrada">
+<!ENTITY annotationSidebarFeedEntriesGroupbox.label "Entradas del feed:">
+<!ENTITY annotationSidebarFeedEntriesTreeColumnTitle.label "Título">
+<!ENTITY annotationSidebarDescriptionNoFeed.label "Este annotation no está disponible actualmente">
+<!ENTITY annotationSidebarFeedEntriesDescription.label "No annotation entrys">
+<!ENTITY annotationSidebarDescriptionLoading.label "Cargando annotation..">
+<!ENTITY annotationSidebarSearch.accesskey "J">
+<!ENTITY annotationSidebarDescriptionNoContent.label "No annotations available">
+<!ENTITY annotationSidebarContentTitle.label "Title:">
+<!ENTITY annotationSidebarContentName.label "Author:">
+<!ENTITY annotationSidebarContentDate.label "Date:">
+<!ENTITY annotationSidebarContentBody.label "Annotation:">

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/es/annotationsidebar.properties
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/es/annotationsidebar.properties	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/es/annotationsidebar.properties	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1 @@
+annotationSidebarFeedInformationBoxAuthor.label=Autor

Modified: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/es/yulup.dtd
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/es/yulup.dtd	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/es/yulup.dtd	2007-02-28 15:17:33 UTC (rev 23031)
@@ -38,3 +38,5 @@
 <!ENTITY editHelpMenuitem.tooltip "Mostrar el navegador de ayuda para Yulup">
 <!ENTITY editDemoMenuitem.tooltip "Ir al portal de demostración">
 <!ENTITY editVersionStringMenuitem.tooltip "La versión de Yulup que está utilizando actualmente">
+<!ENTITY fileOperationNewAnnotationEntryMenuitem.label "Set new annotation">
+<!ENTITY fileOperationNewAnnotationEntryMenuitem.tooltip "Create a new annotation entry for the currently selected text">

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/fr/annotation.dtd
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/fr/annotation.dtd	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/fr/annotation.dtd	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,7 @@
+<!ENTITY annotationDialog.title "Annotation">
+<!ENTITY annotationPointerStringTextbox.label "Quote">
+<!ENTITY annotationAutorNameStringTextbox.label "Autor">
+<!ENTITY annotationCommentStringTextbox.label "Comment">
+<!ENTITY annotationTitleStringTextbox.label "Subject">
+<!ENTITY annotationButtonName.accept "Save">
+<!ENTITY annotationButtonName.cancle "Cancle">

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/fr/annotationsidebar.dtd
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/fr/annotationsidebar.dtd	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/fr/annotationsidebar.dtd	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,20 @@
+<!ENTITY annotationSidebarPage.title "Annotation Sidebar">
+<!ENTITY openYulupAnnotationSidebar.modifiers "shift accel">
+<!ENTITY openYulupAnnotationSidebar.key "J">
+<!ENTITY annotationSidebarFeedInfoGroupbox.label "Annotation Information:">
+<!ENTITY annotationSidebarFirstButton.label "First entry">
+<!ENTITY annotationSidebarPreviousButton.label "Previous entries">
+<!ENTITY annotationSidebarNextButton.label "Next entries">
+<!ENTITY annotationSidebarSearch.label "Search:">
+<!ENTITY annotationSidebarLastButton.label "Last entry">
+<!ENTITY annotationSidebarFeedEntriesGroupbox.label "Annotation Entries:">
+<!ENTITY annotationSidebarFeedEntriesTreeColumnTitle.label "Title">
+<!ENTITY annotationSidebarDescriptionNoFeed.label "This annotation is currently not available">
+<!ENTITY annotationSidebarFeedEntriesDescription.label "No annotation entrys">
+<!ENTITY annotationSidebarDescriptionLoading.label "Loading annotation...">
+<!ENTITY annotationSidebarSearch.accesskey "J">
+<!ENTITY annotationSidebarDescriptionNoContent.label "No annotations available">
+<!ENTITY annotationSidebarContentTitle.label "Title:">
+<!ENTITY annotationSidebarContentName.label "Author:">
+<!ENTITY annotationSidebarContentDate.label "Date:">
+<!ENTITY annotationSidebarContentBody.label "Annotation:">

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/fr/annotationsidebar.properties
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/fr/annotationsidebar.properties	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/fr/annotationsidebar.properties	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1 @@
+annotationSidebarFeedInformationBoxAuthor.label=Author

Modified: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/fr/yulup.dtd
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/fr/yulup.dtd	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/fr/yulup.dtd	2007-02-28 15:17:33 UTC (rev 23031)
@@ -38,3 +38,5 @@
 <!ENTITY editHelpMenuitem.tooltip "Shows the help browser for Yulup">
 <!ENTITY editDemoMenuitem.tooltip "Takes you to the demo site">
 <!ENTITY editVersionStringMenuitem.tooltip "The version of Yulup you are currently using">
+<!ENTITY fileOperationNewAnnotationEntryMenuitem.label "Set new annotation">
+<!ENTITY fileOperationNewAnnotationEntryMenuitem.tooltip "Create a new annotation entry for the currently selected text">

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/ku/annotation.dtd
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/ku/annotation.dtd	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/ku/annotation.dtd	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,7 @@
+<!ENTITY annotationDialog.title "Annotation">
+<!ENTITY annotationPointerStringTextbox.label "Quote">
+<!ENTITY annotationAutorNameStringTextbox.label "Autor">
+<!ENTITY annotationCommentStringTextbox.label "Comment">
+<!ENTITY annotationTitleStringTextbox.label "Subject">
+<!ENTITY annotationButtonName.accept "Save">
+<!ENTITY annotationButtonName.cancle "Cancle">

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/ku/annotationsidebar.dtd
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/ku/annotationsidebar.dtd	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/ku/annotationsidebar.dtd	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,20 @@
+<!ENTITY annotationSidebarPage.title "Annotation Sidebar">
+<!ENTITY openYulupAnnotationSidebar.modifiers "shift accel">
+<!ENTITY openYulupAnnotationSidebar.key "J">
+<!ENTITY annotationSidebarFeedInfoGroupbox.label "Annotation Information:">
+<!ENTITY annotationSidebarFirstButton.label "First entry">
+<!ENTITY annotationSidebarPreviousButton.label "Previous entries">
+<!ENTITY annotationSidebarNextButton.label "Next entries">
+<!ENTITY annotationSidebarSearch.label "Search:">
+<!ENTITY annotationSidebarLastButton.label "Last entry">
+<!ENTITY annotationSidebarFeedEntriesGroupbox.label "Annotation Entries:">
+<!ENTITY annotationSidebarFeedEntriesTreeColumnTitle.label "Title">
+<!ENTITY annotationSidebarDescriptionNoFeed.label "This annotation is currently not available">
+<!ENTITY annotationSidebarFeedEntriesDescription.label "No annotation entrys">
+<!ENTITY annotationSidebarDescriptionLoading.label "Loading annotation...">
+<!ENTITY annotationSidebarSearch.accesskey "J">
+<!ENTITY annotationSidebarDescriptionNoContent.label "No annotations available">
+<!ENTITY annotationSidebarContentTitle.label "Title:">
+<!ENTITY annotationSidebarContentName.label "Author:">
+<!ENTITY annotationSidebarContentDate.label "Date:">
+<!ENTITY annotationSidebarContentBody.label "Annotation:">

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/ku/annotationsidebar.properties
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/ku/annotationsidebar.properties	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/ku/annotationsidebar.properties	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1 @@
+annotationSidebarFeedInformationBoxAuthor.label=Author

Modified: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/ku/yulup.dtd
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/ku/yulup.dtd	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/ku/yulup.dtd	2007-02-28 15:17:33 UTC (rev 23031)
@@ -38,3 +38,5 @@
 <!ENTITY editHelpMenuitem.tooltip "Shows the help browser for Yulup">
 <!ENTITY editDemoMenuitem.tooltip "Takes you to the demo site">
 <!ENTITY editVersionStringMenuitem.tooltip "The version of Yulup you are currently using">
+<!ENTITY fileOperationNewAnnotationEntryMenuitem.label "Set new annotation">
+<!ENTITY fileOperationNewAnnotationEntryMenuitem.tooltip "Create a new annotation entry for the currently selected text">

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/tr/annotation.dtd
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/tr/annotation.dtd	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/tr/annotation.dtd	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,7 @@
+<!ENTITY annotationDialog.title "Annotation">
+<!ENTITY annotationPointerStringTextbox.label "Quote">
+<!ENTITY annotationAutorNameStringTextbox.label "Autor">
+<!ENTITY annotationCommentStringTextbox.label "Comment">
+<!ENTITY annotationTitleStringTextbox.label "Subject">
+<!ENTITY annotationButtonName.accept "Save">
+<!ENTITY annotationButtonName.cancle "Cancle">

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/tr/annotationsidebar.dtd
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/tr/annotationsidebar.dtd	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/tr/annotationsidebar.dtd	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,20 @@
+<!ENTITY annotationSidebarPage.title "Annotation Sidebar">
+<!ENTITY openYulupAnnotationSidebar.modifiers "shift accel">
+<!ENTITY openYulupAnnotationSidebar.key "J">
+<!ENTITY annotationSidebarFeedInfoGroupbox.label "Annotation Information:">
+<!ENTITY annotationSidebarFirstButton.label "First entry">
+<!ENTITY annotationSidebarPreviousButton.label "Previous entries">
+<!ENTITY annotationSidebarNextButton.label "Next entries">
+<!ENTITY annotationSidebarSearch.label "Search:">
+<!ENTITY annotationSidebarLastButton.label "Last entry">
+<!ENTITY annotationSidebarFeedEntriesGroupbox.label "Annotation Entries:">
+<!ENTITY annotationSidebarFeedEntriesTreeColumnTitle.label "Title">
+<!ENTITY annotationSidebarDescriptionNoFeed.label "This annotation is currently not available">
+<!ENTITY annotationSidebarFeedEntriesDescription.label "No annotation entrys">
+<!ENTITY annotationSidebarDescriptionLoading.label "Loading annotation...">
+<!ENTITY annotationSidebarSearch.accesskey "J">
+<!ENTITY annotationSidebarDescriptionNoContent.label "No annotations available">
+<!ENTITY annotationSidebarContentTitle.label "Title:">
+<!ENTITY annotationSidebarContentName.label "Author:">
+<!ENTITY annotationSidebarContentDate.label "Date:">
+<!ENTITY annotationSidebarContentBody.label "Annotation:">

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/tr/annotationsidebar.properties
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/tr/annotationsidebar.properties	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/tr/annotationsidebar.properties	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1 @@
+annotationSidebarFeedInformationBoxAuthor.label=Author

Modified: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/tr/yulup.dtd
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/tr/yulup.dtd	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/tr/yulup.dtd	2007-02-28 15:17:33 UTC (rev 23031)
@@ -38,3 +38,5 @@
 <!ENTITY editHelpMenuitem.tooltip "Shows the help browser for Yulup">
 <!ENTITY editDemoMenuitem.tooltip "Takes you to the demo site">
 <!ENTITY editVersionStringMenuitem.tooltip "The version of Yulup you are currently using">
+<!ENTITY fileOperationNewAnnotationEntryMenuitem.label "Set new annotation">
+<!ENTITY fileOperationNewAnnotationEntryMenuitem.tooltip "Create a new annotation entry for the currently selected text">

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/xml/annotation.dtd.xml
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/xml/annotation.dtd.xml	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/xml/annotation.dtd.xml	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+
+<!--
+ * @author Florian Fricker
+ *
+ * Add multi-language support for the annotation layout
+ *
+-->
+
+<dtd xmlns="http://yulup.wyona.org/1.0">
+
+<entity id="annotationDialog.title">
+	<name xml:lang="en">Annotation</name>
+	<name xml:lang="de">Annotation</name>
+</entity>
+
+<entity id="annotationPointerStringTextbox.label">
+	<name xml:lang="en">Quote</name>
+	<name xml:lang="de">Absatz</name>
+</entity>
+
+<entity id="annotationAutorNameStringTextbox.label">
+	<name xml:lang="en">Autor</name>
+	<name xml:lang="de">Autor</name>
+</entity>
+
+<entity id="annotationCommentStringTextbox.label">
+	<name xml:lang="en">Comment</name>
+	<name xml:lang="de">Kommentar</name>
+</entity>
+
+<entity id="annotationTitleStringTextbox.label">
+	<name xml:lang="en">Subject</name>
+	<name xml:lang="de">Titel</name>
+</entity>
+
+<entity id="annotationButtonName.accept">
+	<name xml:lang="en">Save</name>
+	<name xml:lang="de">Speichern</name>
+</entity>
+
+<entity id="annotationButtonName.cancle">
+	<name xml:lang="en">Cancle</name>
+	<name xml:lang="de">Abbrechen</name>
+</entity>
+
+</dtd>
\ No newline at end of file

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/xml/annotationsidebar.dtd.xml
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/xml/annotationsidebar.dtd.xml	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/xml/annotationsidebar.dtd.xml	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,107 @@
+<?xml version="1.0"?>
+
+<!--
+ * @author Florian Fricker
+ *
+ * Add multi-language support for the annotation-sidebar layout
+ * Add hotkey prefixes for annotation-sidebar
+ *
+-->
+
+<dtd xmlns="http://yulup.wyona.org/1.0">
+
+  <entity id="annotationSidebarPage.title">
+    <name xml:lang="en">Annotation Sidebar</name>
+    <name xml:lang="de">Kommentar Uebersicht</name>
+  </entity>
+  
+  <entity id="openYulupAnnotationSidebar.modifiers">
+    <name xml:lang="en">shift accel</name>
+  </entity>
+  
+  <entity id="openYulupAnnotationSidebar.key">
+    <name xml:lang="en">J</name>
+  </entity>
+  
+  <entity id="annotationSidebarFeedInfoGroupbox.label">
+    <name xml:lang="en">Annotation Information:</name>
+  </entity>
+  
+  <entity id="annotationSidebarFirstButton.label">
+    <name xml:lang="en">First entry</name>
+    <name xml:lang="es">Primera entrada</name>
+  </entity>
+
+  <entity id="annotationSidebarPreviousButton.label">
+    <name xml:lang="en">Previous entries</name>
+    <name xml:lang="es">Entradas previas</name>
+  </entity>
+
+  <entity id="annotationSidebarNextButton.label">
+    <name xml:lang="en">Next entries</name>
+    <name xml:lang="es">Entradas siguientes</name>
+  </entity>
+  
+  <entity id="annotationSidebarSearch.label">
+    <name xml:lang="en">Search:</name>
+    <name xml:lang="es">Buscar:</name>
+  </entity>
+
+  <entity id="annotationSidebarLastButton.label">
+    <name xml:lang="en">Last entry</name>
+    <name xml:lang="es">Última entrada</name>
+  </entity>
+  
+  <entity id="annotationSidebarFeedEntriesGroupbox.label">
+    <name xml:lang="en">Annotation Entries:</name>
+    <name xml:lang="es">Entradas del feed:</name>
+  </entity>
+  
+  <entity id="annotationSidebarFeedEntriesTreeColumnTitle.label">
+    <name xml:lang="en">Title</name>
+    <name xml:lang="es">Título</name>
+  </entity>
+  
+    <entity id="annotationSidebarDescriptionNoFeed.label">
+    <name xml:lang="en">This annotation is currently not available</name>
+    <name xml:lang="es">Este annotation no está disponible actualmente</name>
+  </entity>
+  
+  <entity id="annotationSidebarFeedEntriesDescription.label">
+    <name xml:lang="en">No annotation entrys</name>
+  </entity>
+  
+    <entity id="annotationSidebarDescriptionLoading.label">
+    <name xml:lang="en">Loading annotation...</name>
+    <name xml:lang="es">Cargando annotation..</name>
+  </entity>
+  
+  <entity id="annotationSidebarSearch.accesskey">
+    <name xml:lang="en">J</name>
+  </entity>
+  
+  <entity id="annotationSidebarDescriptionNoContent.label">
+    <name xml:lang="en">No annotations available</name>
+  </entity>
+  
+  <entity id="annotationSidebarContentTitle.label">
+	<name xml:lang="en">Title:</name>
+	<name xml:lang="de">Titel:</name>
+  </entity>
+
+  <entity id="annotationSidebarContentName.label">
+	<name xml:lang="en">Author:</name>
+	<name xml:lang="de">Autor:</name>
+  </entity>
+
+  <entity id="annotationSidebarContentDate.label">
+	<name xml:lang="en">Date:</name>
+	<name xml:lang="de">Datum:</name>
+  </entity>
+
+  <entity id="annotationSidebarContentBody.label">
+	<name xml:lang="en">Annotation:</name>
+	<name xml:lang="de">Kommentar:</name>
+  </entity>
+  
+</dtd>
\ No newline at end of file

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/xml/annotationsidebar.properties.xml
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/xml/annotationsidebar.properties.xml	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/xml/annotationsidebar.properties.xml	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+
+<!--
+ * @author Florian Fricker
+ *
+ * Add multi-language support for the annotation sidebar
+ *
+-->
+
+<dtd xmlns="http://yulup.wyona.org/1.0">
+
+ <entity id="annotationSidebarFeedInformationBoxAuthor.label">
+    <name xml:lang="en">Author</name>
+    <name xml:lang="es">Autor</name>
+ </entity>
+  
+</dtd>
\ No newline at end of file

Modified: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/xml/yulup.dtd.xml
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/locale/xml/yulup.dtd.xml	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/locale/xml/yulup.dtd.xml	2007-02-28 15:17:33 UTC (rev 23031)
@@ -234,5 +234,15 @@
     <name xml:lang="de">Die Version von Yulup die Sie derzeit benützen</name>
     <name xml:lang="es">La versión de Yulup que está utilizando actualmente</name>
   </entity>
+  
+ <entity id="fileOperationNewAnnotationEntryMenuitem.label">
+   <name xml:lang="en">Set new annotation</name>
+   <name xml:lang="de">Kommentar anhaengen</name>
+ </entity>
 
+ <entity id="fileOperationNewAnnotationEntryMenuitem.tooltip">
+   <name xml:lang="en">Create a new annotation entry for the currently selected text</name>
+   <name xml:lang="de">Einen neuen Kommentar fuer den ausgewaehlten Text erstellen</name>
+ </entity>
+
 </dtd>

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/skin/annotation.css
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/skin/annotation.css	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/skin/annotation.css	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,7 @@
+ at namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+
+/* ------------------------ Images ------------------------ */
+
+#annotationImage {
+  list-style-image: url("chrome://yulup/skin/icons/default/yulup-annotation.png");
+}
\ No newline at end of file

Added: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/skin/annotationsidebar.css
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/skin/annotationsidebar.css	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome/skin/annotationsidebar.css	2007-02-28 15:17:33 UTC (rev 23031)
@@ -0,0 +1,30 @@
+ at namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+
+/* ----------------- Feed Sidebar Font ------------------ */
+
+.uiYulupAnnotationSidebarFeedError {
+  text-align: center;
+  white-space: normal;
+  font-weight: bolder;
+  margin: 0px 0px 0px 0px;
+}
+
+/* ----------------- Annotation loading throbber (Not implemented) ------------------ */
+
+#uiYulupAnnotationSidebarFeedLoadingThrobber {
+  -moz-appearance: none;
+  -moz-user-focus: ignore;
+  background-color: transparent;
+  padding: 4px 4px 4px 4px;
+  list-style-image: url("chrome://global/skin/icons/notloading_16.png");
+}
+
+#uiYulupAnnotationSidebarFeedLoadingThrobber[busy="true"] {
+  list-style-image: url("chrome://global/skin/icons/loading_16.gif");
+}
+
+/* ----------------- Deck Font ------------------ */
+
+#uiYulupAnnotationSidebarDeckTitleLabel, #uiYulupAnnotationSidebarDeckNameLabel, #uiYulupAnnotationSidebarDeckDateLabel, #uiYulupAnnotationSidebarDeckBodyLabel {
+  font-weight: bold;
+}
\ No newline at end of file

Modified: public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome.manifest
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome.manifest	2007-02-28 11:45:15 UTC (rev 23022)
+++ public/yulup/src/branches/ANNOTATION_BRANCH/yulup/src/chrome.manifest	2007-02-28 15:17:33 UTC (rev 23031)
@@ -9,3 +9,4 @@
 overlay chrome://browser/content/browser.xul chrome://yulup/content/yulup.xul
 overlay chrome://browser/content/browser.xul chrome://yulup/content/atomsidebar/atomsidebar-overlay.xul
 overlay chrome://browser/content/browser.xul chrome://yulup/content/neutronsidebar/neutronsidebar-overlay.xul
+overlay chrome://browser/content/browser.xul chrome://yulup/content/annotationsidebar/annotationsidebar-overlay.xul




More information about the Phoenix-commits mailing list