nl.justobjects.xbook
Class XDoc

java.lang.Object
  |
  +--nl.justobjects.xbook.XDoc

public class XDoc
extends java.lang.Object

Generates HTML file(s) from XML file.

Purpose
This class is a generic XML to HTML transformer that may be used for a variety of DTDs and XSL scripts. It adds extra functionality over standard XSL transformation.

Implementation
TBS.

Examples
See XBook.java generate() and the xdoc scripts.


$Source: /var/cvs/justobjects/xbook/src/nl/justobjects/xbook/XDoc.java,v $

Since:
$Date: 2003/01/06 10:27:22 $
Version:
$Revision: 1.7 $
Author:
$Author: just $ - Just van den Broecke - Just Objects ©
See Also:

Field Summary
private  java.lang.String destinationFilePath
           
private  org.w3c.dom.Document sourceDocument
           
private  java.lang.String sourceFilePath
           
private static java.lang.String XHTML_TAG
          XHTML tag identifier.
private static java.lang.String XSL_HOME
          Root dir: will be found through CLASSPATH.
private static java.util.HashMap xslDocumentCache
          Cache to parse XSL documents only once for multiple transforms.
private  java.lang.String xslPath
           
 
Constructor Summary
XDoc()
           
 
Method Summary
static void fatal(java.lang.String what, java.lang.Exception e)
           
 java.lang.String getAssetsDir()
           
 java.lang.String getDestinationFilePath()
           
 boolean getDTDCheck()
           
 java.lang.String getDTDName()
           
 org.w3c.dom.Document getSourceDocument()
           
 java.lang.String getSourceFilePath()
           
 org.w3c.dom.Document getXSLDocument()
           
 java.lang.String getXSLPath()
           
static void main(java.lang.String[] args)
           
static void p(java.lang.String s)
           
protected  void postTransform()
           
protected  void preTransform()
           
 void setDestinationFilePath(java.lang.String aDestinationFilePath)
           
private  void setDirectoryVar(java.lang.String aVarName, java.io.File aFile)
           
 void setSourceDocument(org.w3c.dom.Document aSourceDocument)
           
 void setSourceFilePath(java.lang.String aSourceFilePath)
           
 void setXSLPath(java.lang.String aPath)
           
 void transform()
          Perform the task.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

XSL_HOME

private static final java.lang.String XSL_HOME
Root dir: will be found through CLASSPATH.

XHTML_TAG

private static final java.lang.String XHTML_TAG
XHTML tag identifier.

xslDocumentCache

private static final java.util.HashMap xslDocumentCache
Cache to parse XSL documents only once for multiple transforms.

sourceFilePath

private java.lang.String sourceFilePath

destinationFilePath

private java.lang.String destinationFilePath

sourceDocument

private org.w3c.dom.Document sourceDocument

xslPath

private java.lang.String xslPath
Constructor Detail

XDoc

public XDoc()
Method Detail

transform

public void transform()
               throws java.lang.Exception
Perform the task.

getAssetsDir

public java.lang.String getAssetsDir()
                              throws java.lang.Exception

getSourceDocument

public org.w3c.dom.Document getSourceDocument()
                                       throws java.lang.Exception

getDTDCheck

public boolean getDTDCheck()
                    throws java.lang.Exception

getDestinationFilePath

public java.lang.String getDestinationFilePath()
                                        throws java.lang.Exception

getDTDName

public java.lang.String getDTDName()
                            throws java.lang.Exception

getSourceFilePath

public java.lang.String getSourceFilePath()

getXSLDocument

public org.w3c.dom.Document getXSLDocument()
                                    throws java.lang.Exception

getXSLPath

public java.lang.String getXSLPath()
                            throws java.lang.Exception

setSourceDocument

public void setSourceDocument(org.w3c.dom.Document aSourceDocument)

setSourceFilePath

public void setSourceFilePath(java.lang.String aSourceFilePath)

setDestinationFilePath

public void setDestinationFilePath(java.lang.String aDestinationFilePath)

setXSLPath

public void setXSLPath(java.lang.String aPath)

preTransform

protected void preTransform()
                     throws java.lang.Exception

postTransform

protected void postTransform()
                      throws java.lang.Exception

p

public static void p(java.lang.String s)

setDirectoryVar

private void setDirectoryVar(java.lang.String aVarName,
                             java.io.File aFile)

fatal

public static void fatal(java.lang.String what,
                         java.lang.Exception e)

main

public static void main(java.lang.String[] args)


Copyright © 2000-2001 - Just Objects B.V.