Xopus 3


This document describes various items re integration of Xopus 3

Loading/Opening data

Download Xopus from http://www.xopus.com/download/ and unzip and deploy it such that it can be accessed for example with the following URL

WARNING: It doesn't seem to be possible to make it accessible from within a resource, which means using a URL as for example

In order to load data for editing with Xopus 3 one needs to provide an XHTML page containing a link to the main Xopus javascript (xopus.js) and an XML configuration (<x:config>...</x:config>) containing pointers to the actual XML data, its schema and some XSLT for the WYSIWYG transformation of the XML.

This page can be provided at any URL as for example and served with the mime type text/html, whereas please make sure to resolve the Xopus javascript path relative to the page's URL:

<html xmlns="http://www.w3.org/1999/xhtml">
    <title>Starting Xopus ...</title>
    <script src="./Xopus-3.2.10/xopus/xopus.js" type="text/javascript"></script>
  <body bgcolor="#ffffff">
    <div autostart="true" xopus="true">
        <x:config version="1.0" xmlns:x="http://www.xopus.com/xmlns/config">
          <x:pipeline xml="sample.xml" xsd="sample.xsd">
            <x:view name="WYSIWYG View">
              <x:transform xsl="sample.xsl"/>
            <x:view name="XML View">

The actual content and it's related schema and XSLT are resolved then by Xopus relative to the location of the above page, for example

NOTE: After loading this page and in particular loading the Xopus javascript, one will be redirected to Xopus-3.xx/xopus/xopus.html, whereas this page will be kept as reference within the URL. (The page Xopus-3.x.x/xopus/xopus.html is referencing a favicon.ico, but which doesn't exist within the Xopus-3.x.x/xopus/media folder! One might want to add one in order to avoid 404 messages within the log-file.)

Saving data

In order to save data from Xopus to the server one needs to implement a custom javascript save function (and also an exit function):

// This function is called when the save button is pressed, or when the save function is called on an XMLDocument.
function mySaveFunction(uri, xmlDocument)
  // HTTP POST the XML document
  var result = HTTPTools.postXML(uri, xmlDocument,"UTF-8");

  // Show a dialog with the result.  
  //return confirm("Called save\n" + "Result: " + result + "\n");

// Register the save function.

// Set exit URL:
var exitURL = unescape(window.location.href).split('#')[0].split('?')[0] + '?yanel.resource.usecase=checkin';


The file containing the javascript code above needs to be referenced from within the x:config

      <!-- .. -->

    <x:javascript src="./Xopus-3.2.10/custom/save.js"/>


The "Lookups" need to be configured within x:config

      <!-- .. -->

      <!-- Image Lookup -->
      <x:lookup xmlns:yanel="http://wyona.org/yanel/1.0"
      <!-- Link Lookup -->
      <x:lookup xmlns:xhtml="http://www.w3.org/1999/xhtml"

Sometimes Xopus hangs after closing a lookup. This can be 'fixed' by adding a sleep() to Xopus-3.2.10/xopus/media/lookup.html

funtion doUnload() {

In order to transfer the values from the custom Lookup-Dialog into Xopus one needs to use top.dialogArguments (instead window.dialogArguments as used by Xopus 2)


Xopus depends on the MSXML Parser, whereas depending on the version of the MSXML Parser one needs to adapt the schemas and XSLTs. In order to test what version you have installed, please browse to the following URL http://xopus.com/files/msxmltester/

Depending on the schemas and XSLTs provided by the server you might have to upgrade your locally installed MSXML Parser.


Your comments are much appreciated

Is the content of this page unclear or you think it could be improved? Please add a comment and we will try to improve it accordingly.