## Xalan-C++ API Documentation

### The Xalan C++ XSLT Processor Version 1.9

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

# XalanFileUtility Class Reference

Collaboration diagram for XalanFileUtility:

[legend]
List of all members.

## Public Types

- typedef XalanVector< XalanDOMString > FileNameVectorType

## Public Member Functions

- XalanFileUtility (MemoryManagerType &theManager)
    Simple constructor, does not perform initialization.
- ~XalanFileUtility ()
- XalanDOMString & getDrive (XalanDOMString &theResult)
    Utility method used to get test files from a specific directory.
- bool getParams (int argc, char *argv[], const char *outDir, bool fsetGold=true)
- FileNameVectorType & getTestFileNames (const XalanDOMString &baseDir, const XalanDOMString &relDir, bool useDirPrefix, FileNameVectorType &theFiles)
- FileNameVectorType & getDirectoryNames (const XalanDOMString &rootDirectory, FileNameVectorType &theFiles)
    Utility method used to get subdirectories from a specific directory.
- void checkAndCreateDir (const XalanDOMString &directory)
    Utility method used to create default directories when neccessary.
- bool checkDir (const XalanDOMString &directory)
    Utility method determines if directory exists.
- XalanDOMString & getXSLFileName (const XalanDOMString &theXMLFileName, XalanDOMString &theResult)
    Utility method used to get XSL file based on XML file.
- XalanDOMString & generateFileName (const XalanDOMString &theXMLFileName, const char *suffix, XalanDOMString &theResult, bool *status=0)
    Utility method used to get OUT file based on XML file.
- XalanDOMString & generateUniqRunid (XalanDOMString &theResult)
    Utility method used to generate UniqRunid.
- XalanDOMString & getXercesVersion (XalanDOMString &theResult)
    Utility methods used to get Xerces Version number.
- void checkResults (const XalanDOMString &outputFile, const XalanDOMString &goldFile, XalanXMLFileReporter &logfile)
- void checkAPIResults (const XalanDOMString &actual, const XalanDOMString &expected, const char *msg, XalanXMLFileReporter &logfile, const XalanDOMString &outputFile, const XalanDOMString &goldFile, bool containsOnly=false)
- void checkAPIResults (const char *actual, const char *expected, const char *msg, XalanXMLFileReporter &logfile, const XalanDOMString &outputFile, const XalanDOMString &goldFile, MemoryManagerType &theManager, bool containsOnly=false)
- void checkDOMResults (const XalanDOMString &theOutputFile, const XalanCompiledStylesheet *compiledSS, const XalanSourceTreeDocument *dom, const XSLTInputSource &goldInputSource, XalanXMLFileReporter &logfile)
    Utility method used to compare the results.
- bool compareSerializedResults (const XalanDOMString &transformResult, const XalanDOMString &goldInputSource)
- FormatterListener * getXMLFormatter (PrintWriter &resultWriter, int indentAmount, const XalanDOMString &mimeEncoding, const StylesheetRoot *stylesheet)
    Utility method used to create a FormatterToXML FormatterListener.
- bool fileCompare (const char *goldFile, const char *outputFile)
- bool domCompare (const XalanNode &gold, const XalanNode &doc)
    Utility methods used to perform a DOM Compare.
- bool domCompare (const XalanDocument &gold, const XalanDocument &doc)
    Utility methods used to perform a DOM Compare.
- bool diffElement (const XalanNode &gold, const XalanNode &doc)
    Utility methods used to diff two Element nodes.
- bool diffNode (const XalanNode &gold, const XalanNode &doc)
    Utility methods used to diff two nodes.
- bool diffNode (const XalanNode *gold, const XalanNode *doc)
    Utility methods used to diff two nodes.
- bool diffElement2 (const XalanNode &gold, const XalanNode &doc)
    Utility methods used to diff two Element nodes.
- bool diffAttr (const XalanNode *gAttr, const XalanNode *dAttr)
    Utility methods used to diff two attribute nodes.
- void reportPassFail (XalanXMLFileReporter &logfile)
    Utility methods used to report Pass/Fail numbers.
- void reportPassFail (XalanXMLFileReporter &logfile, const XalanDOMString &runid)
- void analyzeResults (XalanTransformer &xalan, const XalanDOMString &resultsFile)

## Public Attributes

- XALAN_HARNESS_EXPORT XalanFileUtility::reportStruct data
- XALAN_HARNESS_EXPORT XalanFileUtility::cmdParams args

## Static Public Attributes

- const XalanDOMChar s_xmlSuffix []
- const XalanDOMChar s_pathSep []

## Member Typedef Documentation

typedef XalanVector<XalanDOMString> XalanFileUtility::FileNameVectorType

## Constructor & Destructor Documentation

XalanFileUtility::XalanFileUtility | ( | MemoryManagerType & | theManager | ) |

| Simple constructor, does not perform initialization.

XalanFileUtility::~XalanFileUtility | ( |  | ) |

## Member Function Documentation

void XalanFileUtility::analyzeResults | ( | XalanTransformer & | xalan,
|  | const XalanDOMString & | resultsFile
| ) |

void XalanFileUtility::checkAndCreateDir | ( | const XalanDOMString & | directory | ) |

| Utility method used to create default directories when neccessary.

void XalanFileUtility::checkAPIResults | ( | const char * | actual,
|  | const char * | expected,
|  | const char * | msg,
|  | XalanXMLFileReporter & | logfile,
|  | const XalanDOMString & | outputFile,
|  | const XalanDOMString & | goldFile,
|  | MemoryManagerType & | theManager,
|  | bool | containsOnly = false
| ) |

void XalanFileUtility::checkAPIResults | ( | const XalanDOMString & | actual,
|  | const XalanDOMString & | expected,
|  | const char * | msg,
|  | XalanXMLFileReporter & | logfile,
|  | const XalanDOMString & | outputFile,
|  | const XalanDOMString & | goldFile,
|  | bool | containsOnly = false
| ) |

bool XalanFileUtility::checkDir | ( | const XalanDOMString & | directory | ) |

| Utility method determines if directory exists.

void XalanFileUtility::checkDOMResults | ( | const XalanDOMString & | theOutputFile,
|  | const XalanCompiledStylesheet * | compiledSS,
|  | const XalanSourceTreeDocument * | dom,
|  | const XSLTInputSource & | goldInputSource,
|  | XalanXMLFileReporter & | logfile
| ) |

| Utility method used to compare the results. It inturn call domCompare. Returns: Void.

void XalanFileUtility::checkResults | ( | const XalanDOMString & | outputFile,
|  | const XalanDOMString & | goldFile,
|  | XalanXMLFileReporter & | logfile
| ) |

bool XalanFileUtility::compareSerializedResults | ( | const XalanDOMString & | transformResult,
|  | const XalanDOMString & | goldInputSource
| ) |

bool XalanFileUtility::diffAttr | ( | const XalanNode * | gAttr,
|  | const XalanNode * | dAttr
| ) |

| Utility methods used to diff two attribute nodes. Returns: boolean.

bool XalanFileUtility::diffElement | ( | const XalanNode & | gold,
|  | const XalanNode & | doc
| ) |

| Utility methods used to diff two Element nodes. Returns: boolean.

bool XalanFileUtility::diffElement2 | ( | const XalanNode & | gold,
|  | const XalanNode & | doc
| ) |

| Utility methods used to diff two Element nodes. Returns: boolean.

bool XalanFileUtility::diffNode | ( | const XalanNode * | gold,
|  | const XalanNode * | doc
| ) |

| Utility methods used to diff two nodes. Returns: true if the nodes are equal, and false if not.

bool XalanFileUtility::diffNode | ( | const XalanNode & | gold,
|  | const XalanNode & | doc
| ) |

| Utility methods used to diff two nodes. Returns: true if the nodes are equal, and false if not.

bool XalanFileUtility::domCompare | ( | const XalanDocument & | gold,
|  | const XalanDocument & | doc
| ) |

| Utility methods used to perform a DOM Compare. Returns: boolean

bool XalanFileUtility::domCompare | ( | const XalanNode & | gold,
|  | const XalanNode & | doc
| ) |

| Utility methods used to perform a DOM Compare. Returns: boolean

bool XalanFileUtility::fileCompare | ( | const char * | goldFile,
|  | const char * | outputFile
| ) |

XalanDOMString& XalanFileUtility::generateFileName | ( | const XalanDOMString & | theXMLFileName,
|  | const char * | suffix,
|  | XalanDOMString & | theResult,
|  | bool * | status = 0
| ) |

| Utility method used to get OUT file based on XML file. Returns: a XalanDOMString.

XalanDOMString& XalanFileUtility::generateUniqRunid | ( | XalanDOMString & | theResult | ) |

| Utility method used to generate UniqRunid. Returns: a XalanDOMString.

FileNameVectorType& XalanFileUtility::getDirectoryNames | ( | const XalanDOMString & | rootDirectory,
|  | FileNameVectorType & | theFiles
| ) |

| Utility method used to get subdirectories from a specific directory. Returns: a vector containing directory files.

XalanDOMString& XalanFileUtility::getDrive | ( | XalanDOMString & | theResult | ) |

| Utility method used to get test files from a specific directory. Returns: a vector containing test files.

bool XalanFileUtility::getParams | ( | int | argc,
|  | char * | argv[],
|  | const char * | outDir,
|  | bool | fsetGold = true
| ) |

FileNameVectorType& XalanFileUtility::getTestFileNames | ( | const XalanDOMString & | baseDir,
|  | const XalanDOMString & | relDir,
|  | bool | useDirPrefix,
|  | FileNameVectorType & | theFiles
| ) |

XalanDOMString& XalanFileUtility::getXercesVersion | ( | XalanDOMString & | theResult | ) |

| Utility methods used to get Xerces Version number. Returns: a XalanDOMString.

FormatterListener* XalanFileUtility::getXMLFormatter | ( | PrintWriter & | resultWriter,
|  | int | indentAmount,
|  | const XalanDOMString & | mimeEncoding,
|  | const StylesheetRoot * | stylesheet
| ) |

| Utility method used to create a FormatterToXML FormatterListener. This is required to DOM comparisions. Returns: a pointer to a FormatterListener.

XalanDOMString& XalanFileUtility::getXSLFileName | ( | const XalanDOMString & | theXMLFileName,
|  | XalanDOMString & | theResult
| ) |

| Utility method used to get XSL file based on XML file. Returns: a XalanDOMString.

void XalanFileUtility::reportPassFail | ( | XalanXMLFileReporter & | logfile,
|  | const XalanDOMString & | runid
| ) |

void XalanFileUtility::reportPassFail | ( | XalanXMLFileReporter & | logfile | ) |

| Utility methods used to report Pass/Fail numbers. Returns: void.

## Member Data Documentation

struct XALAN_HARNESS_EXPORT XalanFileUtility::cmdParams XalanFileUtility::args

struct XALAN_HARNESS_EXPORT XalanFileUtility::reportStruct XalanFileUtility::data

const XalanDOMChar XalanFileUtility::s_pathSep[]`[static]`

const XalanDOMChar XalanFileUtility::s_xmlSuffix[]`[static]`

The documentation for this class was generated from the following file:

- XalanFileUtility.hpp

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.9 Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.