Getting Started

In the most simple terms, the following steps are what you have to do to get Xopus implemented on you web server:

Download Xopus from http://www.xopus.com/download. If you aren't running on your localhost or 127.0.0.1, you need to contact xopussupport@sdl.com for a developer license for your server. The license files go into the folder license which is located next to your xopus directory. These are files. The files for localhost and 127.0.0.1 are already present.

Move the files to the server, so that you can access the path xopus/xopus.html on your web server.

You should have the following folders in your webserver: config, documentation, examples, licence, xopus.

When you indeed open xopus/xopus.html you will see that Xopus doesn't have a document. Xopus needs some XML. You can point to an XML in several ways in Xopus:

You can provide a path to it, in a hash (#) string. You then open your document in your web server with something like http://yourhost/xopus/xopus.html#http://yourhost/yourpath/yourdocument.xml

You can either point to an XML file directly, or point to an HTML file in which you define a, so called, Xopus island. Which looks something like this:

<div xopus="true">
  Starting Xopus... 
  <xml>
    <config version="1.0" xmlns="http://www.xopus.com/xmlns/config"> 
      <pipeline xml="/xmldoc/document.xml" xsd="schema.xsd">
        <view name="WYSIWYG View"> 
          <transform xsl="document.xsl"/> 
        </view> 
      </pipeline> 
    </config> 
  </xml> 
</div>

You can create an HTML file, with an island and point to xopus.js to start Xopus for that page.

<script type="text/javascript" src="/xopus/xopus.js"></script>

You then have a similar island as above in your HTML page, but the URL that you go to is cleaner: http://yourhost/yourpath/yourdocument.html

  • XML in Xopus needs an XSL and an XSD (Schema). Pointing to XSL and XSD can either be done in the XML itself, or it can be done in the HTML page that you made, as you see above. This is called the Xopus canvas.

  • On the pipeline element is a reference to an XML Schema file, and in each view you can point to an XSL Stylesheet to transform the XML with.

  • Now, if all things are well, you can see your XML, transformed by your XSL and you can edit it in Xopus within the limits of your XSD. You can't actually save it though, because Xopus doesn't know yet where it has to go. So you have to define a save-function.

  • You can define this function in config/config.js. This file is placed adjacent to xopus/xopus.html. This function can send XML from Xopus to your server.

  • Now you need to connect this save function to your server logic. You need to catch the XML and actually save it somewhere, into a file or your database.

Now Xopus is working. Xopus is now placed between the database and showing your content. It gets the content from the database and then shows it with the XSL stylesheet. In Xopus your XML is kept valid with the Schema. When you save it sends the XML back to the database where it is saved.