BizTalk Utilities CV ,   Jobs ,   Code library  
 
Home Page
XALAN
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 :552

 

Xalan: The org.apache.xalan.xslt.EnvironmentCheck Class

Extends: java.lang.Object

Members

Signature

Public methods

void

appendEnvironmentReport(Node container, Document factory, java.util.Hashtable h)

boolean

checkEnvironment(java.io.PrintWriter pw)

java.util.Hashtable

getEnvironmentHash()

static void

main(java.lang.String[] args)

Overview

This is a utility class to report simple information about the environment. This class helps to get environment setup of your system.

Note: This class is pretty simplistic: results are not necessarily definitive nor will it find all problems related to environment setup. Also, you should avoid calling this in deployed production code, both because it is quite slow and because it forces classes to get loaded.

Note: This class explicitly has very limited compile-time dependencies to enable easy compilation and usage even when Xalan, DOM/SAX/JAXP, etc. are not present.

Note: for an improved version of this utility, please see the xml-commons' project which utility which does the same kind of thing but in a much simpler manner.

To use this class ensure that xalan.jar is in your class path.

Method Overviews

Usage:

            You can use this utility class from command line as below:

java org.apache.xalan.xslt.EnvironmentCheck [-out outFile]

If you want your environment details to be written in your file the you can add the argument. Otherwise your environment details will be printed in command line. The output would be:

#---- BEGIN writeEnvironmentReport($Revision: 1.14 $): Useful stuff found: ----

version.DOM.draftlevel=2.0fd

java.class.path=.;C:\Program Files\CA\Ingres [II]\ingres\lib\iijdbc.jar;C:\fop-0

.20.5\build\fop.jar;C:\xalan-j_2_6_0\bin\bsf.jar;C:\xalan-j_2_6_0\bin\xalan.jar;

C:\xalan-j_2_6_0\bin\xalansamples.jar;C:\xalan-j_2_6_0\bin\xercesImpl.jar;C:\xal

an-j_2_6_0\bin\xml-apis.jar;C:\xalan-j_2_6_0\bin\xsltc.jar;C:\xalan-j_2_6_0\bin\

xsltcapplet.jar;C:\xalan-j_2_6_0\bin\xsltcbrazil.jar;C:\xalan-j_2_6_0\bin\xsltce

jb.jar;C:\xalan-j_2_6_0\bin\xsltcservlet.jar;C:\xerces-1_4_4\xerces.jar

version.JAXP=1.1

Usage from Java class:

If you want to check your environment details in your program then you can use methods provided by this class

Example of getEnvironmentHash():

           

getEnvironmentHash() returns Hashtable with various system and CLASSPATH, etc. properties are put into the hash as keys with a brief description of the current state of that item as the value.

public void checkEnviorment(){

        EnvironmentCheck environmentCheck = new EnvironmentCheck();

        Hashtable environmentHash = environmentCheck.getEnvironmentHash();

        Enumeration enumeration = environmentHash.keys();

        while(enumeration.hasMoreElements()){

            Object object = enumeration.nextElement();

            System.out.println("Key Name :"+object);

            System.out.println("Key value :"+environmentHash.get(object));

        }

    }

Usage from XSLT Sylesheet:

You can also use this class in your stylesheet with namespace xmlns:xalan="http://xml.apache.org/xalan. You should ensure that your stylesheet processor is able to load this namespace.
<xsl:template match="/">
      <xsl:copy-of select="xalan:checkEnvironment()"/>
</xsl:template>

Rate this article on a scale of 1 to 10

Your vote :  


 

Recent Jobs

A great opportunity to Digital Vide
here is a greate opportunity as a S
A great opportunity as a Network En
A Greate Opportunituy as a SQL Deve
An immediate job opportunity as a B

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



chicago web site design
conference call for CA
Host Department NOLIMIT Web Hosting
UK Web Designers
Emporio armani sunglasses
New Jersey pool contractor
answering service
it outsourcing
swimming pool builder
MSN
sunglasses


    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