XT and XSLT translator Program

Instructions
  1. To run xt on Unix, you need to append the path to xt.jar, xp.jar and sax.jar onto the CLASSPATH varible in .cshrc file.
    setenv CLASSPATH .:${CLASSPATH}:PATH-TO-XT/xt.jar:PATH-TO-XP/xp.jar:PATH-TO- SAX/sax.jar

  2. Then run xt as following
    java com.jclark.xsl.sax.Driver source.xml stylesheet.xsl result.xml
  3. If you are working on windows, you can download xt-win32.zip from ftp://ftp.jclark.com/pub/xml/xt-win32.zip. After unzipping this file, you will get an xt.exe
  4. The usage of xt.exe is
    xt source.xml stylesheet.xsl result.xml eg.
    sample1.xml is
    
    <?xml version="1.0"?>
    <sample>
    <hello>World!</hello>
    </sample>
    
    sample1.xsl is
    
    <?xml version="1.0"?>
    <xsl:stylesheet
      xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"
      xmlns="http://www.w3.org/TR/REC-html40"
      result-ns="">
    
      <xsl:output indent="yes" encoding="iso-8859-1" method="html"
          doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN"/>
    
      <xsl:template match="hello">
        <xsl:text>Hello, </xsl:text>
        <xsl:apply-templates/>
      </xsl:template>
    
      <xsl:template match="/">
            <html><head><title>Example</title></head><body>
        <xsl:apply-templates/>
            </body></html>
      </xsl:template>
    
    </xsl:stylesheet>
    
    then after running
    xt sample1.xml sample1.xsl output.xml
    you will get output.html as the following
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet result-ns="" xmlns:xsl="http://www.w3.org/XSL/Transform/1.0" 
    xmlns="http://www.w3.org/TR/REC-html40">
    <xsl:output indent="yes" encoding="iso-8859-1" method="html" doctype-public="-
    //W3C//DTD HTML 4.0 Transitional//EN"/>
    <xsl:template match="hello">
    <xsl:text>Hello, 
    </xsl:text>
    <xsl:apply-templates/>
    </xsl:template>
    <xsl:template match="/">
    <html><head><title>Example</title></head><body>
    <xsl:apply-templates/>
    </body></html>
    </xsl:template>
    </xsl:stylesheet>
    
    Following are some useful links for xt
    http://4xt.org/
    http://www.javertising.com/webtech/usingxt.htm
    http://vedavid.org/xml/docs/XT_Mac_Windows.html
    
    The University of Southern California does not screen or control the content on this website and thus does not guarantee the accuracy, integrity, or quality of such content. All content on this website is provided by and is the sole responsibility of the person from which such content originated, and such content does not necessarily reflect the opinions of the University administration or the Board of Trustees