BizTalk Utilities CV ,   Jobs ,   Code library  
 
Home Page
XALAN
org.apache.xalan.xslt.Process Class
org.apache.xalan.xslt.EnvironmentCheck Class
org.apache.xalan.xsltc.trax.TransformerFactoryImpl Class
org.apache.xalan.xsltc.trax.TemplatesImpl Class
org.apache.xalan.xsltc.trax.SmartTransformerFactoryImpl Class
org.apache.xalan.xsltc.trax.DOM2SAX Class
org.apache.xalan.transformer.XalanProperties Class
org.apache.xalan.transformer.TrAXFilter Class
org.apache.xalan.transformer.TransformerIdentityImpl Class
org.apache.xalan.processor.TransformerFactoryImpl Class
org.apache.xalan.lib.sql.XConnection Class
javax.xml.transform.sax.TemplatesHandler Class
XALAN Getting Started with XSLTC
The Usage of XALAN
Overview of XALAN - Java
<< WCF, WS, SOAP
XHTML >>

By :Mark Wilson
I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :03/24/2008
Times viewed :868

 

Xalan: The org.apache.xml.dtm.DTMManager Class

Direct Known Subclasses:org.apache.xml.dtm.ref.DTMManagerDefault, org.apache.xpath.XPathContext

Members

Signature

Public methods

abstract  DTM

createDocumentFragment()

abstract  DTMIterator

createDTMIterator(int node)

abstract  DTMIterator

createDTMIterator(int whatToShow, DTMFilter filter, boolean entityReferenceExpansion)

abstract  DTMIterator

createDTMIterator(java.lang.Object xpathCompiler, int pos)

abstract  DTMIterator

createDTMIterator(java.lang.String xpathString, PrefixResolver presolver)

abstract  DTM

getDTM(int nodeHandle)

abstract  DTM

getDTM(Source source, boolean unique, DTMWSFilter whiteSpaceFilter, boolean incremental, boolean doIndexing)

abstract  int

getDTMHandleFromNode(Node node)

abstract  int

getDTMIdentity(DTM dtm)

int

getDTMIdentityMask()

static boolean

getIncremental()

int

getNodeIdentityMask()

XMLStringFactory

getXMLStringFactory()

static DTMManager

newInstance(XMLStringFactory xsf)

abstract  boolean

release(DTM dtm, boolean shouldHardDelete)

static void

setIncremental(boolean incremental)

void

setXMLStringFactory(XMLStringFactory xsf)

Overview

This is a abstract class. A DTMManager instance can be used to create DTM and DTMIterator objects, and manage the DTM objects in the system.

The system property that determines which Factory implementation to create is named "org.apache.xml.utils.DTMFactory". This property names a concrete subclass of the DTMFactory abstract class. If the property is not defined, a platform default is be used.

An instance of this class must be safe to use across thread instances. It is expected that a client will create a single instance of a DTMManager to use across multiple threads. This will allow sharing of DTMs across multiple processes.

Note: this class is incomplete right now. It will be pretty much modeled after javax.xml.transform.TransformerFactory in terms of its factory support. So I have given example of how to create it.

Method Overviews

All methods in this class are abstract. So depending upon the system property of Factory class, a concrete instance will get created and that will support all methods. Please look into newInstance() method to know the look up procedure.

Example of creating a DTM Manager using newInstance(XMLStringFactory xsf)

                              throws DTMConfigurationException:

Obtain a new instance of a DTMManager. This static method creates a new factory instance This method uses the following ordered lookup procedure to determine the DTMManager implementation class to load:

Use the org.apache.xml.dtm.DTMManager system property.

Use the JAVA_HOME(the parent directory where jdk is installed)/lib/xalan.properties for a property file that contains the name of the implementation class keyed on the same value as the system property defined above.

Use the Services API (as detailed in the JAR specification), if available, to determine the classname. The Services API will look for a classname in the file META-INF/services/org.apache.xml.dtm.DTMManager in jars available to the runtime.

Use the default DTMManager classname, which is org.apache.xml.dtm.ref.DTMManagerDefault.

Once an application has obtained a reference to a DTMManager it can use the factory to configure and obtain parser instances.

Note: If it fails to load a concrete factory class, then it will throw NPE.

        XMLStringFactoryDefault stringFactory = new XMLStringFactoryDefault();

        DTMManager dtmManager = DTMManager.newInstance(stringFactory);

Example of createDocumentFragment():

This method creates a DTM representing an empty DocumentFragment object.

            DTM dtm = dtmManager.createDocumentFragment();

Note: This class is still incomplete. The DTM API is still Subject To Change. This wouldn't affect most users, but might require updating some extensions.


Rate this article on a scale of 1 to 10

Your vote :  


 

Recent Jobs

Integration Specialist Needed - Wor
Virtualization Server Infrastructur
A great opportunity to Digital Vide
here is a greate opportunity as a S
A great opportunity as a Network En

View all Jobs (Add yours)
View all CV (Add yours)




swimming pool contractor
chicago web site design
fax online
Domain Names
online fax
D&g sunglasses
answering service


    Email TopXML  

Front Page Daily Stuff TopXML Forum XML blogs XML Newsgroups BizTalk Biztalk Utilities Biztalk Utilities Tutorial B2B SAP XML Microsoft .NET Dotnet System XML Soapformatter SQLXML XMLserializer XQuery PHP PHP SimpleXML PHP XML Dom PHP XML RPC PHP XSLT Java Java Java XML Xalan Microsoft ASP ASP Schemas XML SQL Server XML XMLDom XSL XSL Tutorial XSLT Stylesheets General Javascript CSS XHTML WAP