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 are running on your localhost or 127.0.0.1 you can skip this step, otherwise you need to contact sales@xopus.com for a license for your server.

    License files go into the folder /licence/ 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:

  1. config/

  2. documentation/

  3. examples/

  4. licence/

  5. 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:

  1. 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:

Example

<div xopus="true" autostart="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>
  1. You can create an HTML file, with an island and point to xopus.js to start Xopus for that page.

Example

<script type="text/javascript" src="/xopus/xopus.js"></script>
    
  1. 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 xsd 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.