TetraSix

Majix Light 1.1

MaJix

  • What's new ?
  • TetraSix Software License Agreement for Majix
  • Downloading Majix
  • Obtaining a Java VM
  • Running Majix
  • Majix process
  • Majix user interface
  • Majix input format
  • Majix intermediate format
  • Majix output format
  • Modify input format
  • Modify XML tag names
  • Browsing XML documents
  • The configuration file
  • The tools
  • The sample
  • Comments
  • Browsing XML documents

    Netscape Navigator and Internet Explorer 4.0 are not able to directly display XML documents yet, but it is possible to convert the XML documents into HTML using XT.

    Internet Explorer 5beta2 is able to display directly XML documents using either a CSS stylesheet or an XSL stylesheet.

    WARNING : the XSL stylesheet standard is still under development. The current version available at the release date of Majix 1.1 is the Working draft of December 1998. XT and IE5b2 implements slightly different versions of XSL, so that is not currently possible to use a single XSl stylesheet with both tools.

    Conversion to HTML

    The program XT by James Clarck converts XML files into HTML files using a XSL stylesheet.

    The Tools button in Majix main dialogue box allows you to launch XT directly.

    Notes: The HTML version of Majix documentation has been produced by XT, without any manual modification.

    A sample XSL stylesheet

    You can find a few simple XSL stylesheets which can be used to display XML documents conforming to the provided DTD :

    • The stylesheet simple.xsl is used to convert XML documents produced by the conversion process into HTML, using XT;

    • The stylesheet splitter.xsl is used to convert XML documents produced by the splitter process into HTML, using XT;

    • The stylesheet mydoc.xsl is used to display XML documents produced by the conversion process using IE5b2.

    There is a point rather delicate when converting XML documents produced by the splitter into HTML. When processing links, the splitter must replace internal URL (line "#foo") into full URL when the target element is in another chapter. Of course, it uses the path name of the new component, which uses the .xml extension. When converting into HTML, one needs to replace the .xml extension by a .html extension. The current version of XSL does not allow to perform such modifications. We therefore use an extension mechanism provided by XT, which allows us to call Java written "filters" to process the subtree. The non-portable fragment of the stylesheet is the following:

    <xsl:template match="link[@url]">

    <xsl:filter classid="java:com.tetrasix.majix.tools.URLFilter">

    <xsl:arg name="url" value="{@url}"/>

    <xsl:apply-templates/>

    </xsl:filter>

    </xsl:template>

    This fragment uses the Java class com.tetrasix.majix.tools.URLFilter which replaces any .xml extension into .html.

    The same functionality can be provided in IE5b2 using scripts.

    Note: the stylesheet splitter.xsl assumes that the graphics are in the directory ../docs/images. This has been done avoid to diuplicate the images which are stored in the subdirectory docs/images of the installation directory. The generated HTML files will be in the same directory as the original XML file (i.e. sample), but will use the images in the same location as the provided documentation in the docs subdirectory.


    Copyright TetraSix, 1999 - info@tetrasix.com