org.ibisph.dao.xml
Class XIncludeDocument
java.lang.Object
org.ibisph.dao.xml.XIncludeDocument
public class XIncludeDocument
- extends java.lang.Object
XInclude that uses a SystemID for the source XML file and processes the XInclude statements with an XSLT transformation.
- Author:
- Garth Braithwaite, STG
|
Field Summary |
protected javax.xml.transform.Transformer |
transformer
|
|
Method Summary |
org.dom4j.Document |
get(java.lang.String xmlFilename,
java.util.Map parameters)
Required implementation method that builds an XIncluded document. |
void |
setXincludeXSLTSystemIDResource(SystemID xincludeXSLTSystemIDResource)
Sets the xinclude XSLT which basically creates the transformer object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
transformer
protected javax.xml.transform.Transformer transformer
XIncludeDocument
public XIncludeDocument()
XIncludeDocument
public XIncludeDocument(SystemID xincludeXSLTSystemIDResource)
throws java.io.FileNotFoundException,
javax.xml.transform.TransformerConfigurationException
- Constructor which sets the xinclude XSLT.
- Parameters:
xincludeXSLTSystemIDResource - SystemID to the XInclude XSLT.
- Throws:
java.io.FileNotFoundException
javax.xml.transform.TransformerConfigurationException
setXincludeXSLTSystemIDResource
public void setXincludeXSLTSystemIDResource(SystemID xincludeXSLTSystemIDResource)
throws java.io.FileNotFoundException,
javax.xml.transform.TransformerConfigurationException
- Sets the xinclude XSLT which basically creates the transformer object.
- Parameters:
xincludeXSLTSystemIDResource - SystemID to the XInclude XSLT.
- Throws:
java.io.FileNotFoundException
javax.xml.transform.TransformerConfigurationException
get
public org.dom4j.Document get(java.lang.String xmlFilename,
java.util.Map parameters)
throws javax.xml.transform.TransformerException,
java.io.FileNotFoundException
- Required implementation method that builds an XIncluded document. The
resulting xinclude document is processed using an XSLT transformation.
As of 2004, most XML engines did not fully support the
xinclude
directive as such, an XSLT was developed to provide this
functionality. Note that the xinclude statement contained
within the XML file will be dependent on the namespace needed for the
XSLT. This means that the XML documents will not be as standard or as
portable.
- Parameters:
xmlFilename - Base/main XML source document path and filename for the
XML file to be processed for "xinclude" statements and loaded.parameters - Optional name value pair map values to be passed
to the XSLT.
- Returns:
- XML document that has been processed for XInclude statements.
The resulting document is totally dependent on the way the
XSLT is programmed and may or may not handle recursive XInclude
statements within XIncluded documents.
- Throws:
javax.xml.transform.TransformerException
java.io.FileNotFoundException