## 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

# XalanXMLFileReporter Class Reference

Collaboration diagram for XalanXMLFileReporter:

[legend]
List of all members.

## Public Types

- typedef XalanMap< XalanDOMString,
  XalanDOMString > Hashtable
- typedef FILE FileHandleType

## Public Member Functions

- XalanXMLFileReporter (MemoryManagerType &theManager, const XalanDOMString &fileName)
- bool initialize (MemoryManagerType &theManager)
- MemoryManagerType & getMemoryManager ()
- bool getFlushOnCaseClose ()
- const XalanDOMString & getFileName () const
- void setFileName (const XalanDOMString &fileName)
- void setFileName (const char *fileName, MemoryManagerType &theManager)
- bool checkError ()
- bool isReady ()
- void flush ()
- void close ()
- void logTestFileInit (const XalanDOMString &msg)
    Report that a testfile has started.
- void logTestFileInit (const char *msg)
- void logTestFileClose (const XalanDOMString &msg, const XalanDOMString &result)
    Report that a testfile has finished, and report it's result.
- void logTestFileClose (const char *msg, const char *result)
- void logTestCaseInit (const XalanDOMString &msg)
- void logTestCaseInit (const char *msg)
- void logTestCaseClose (const XalanDOMString &msg, const XalanDOMString &result)
    Report that a testcase has finished, and report it's result.
- void logTestCaseClose (const char *msg, const char *result)
- void logMessage (int level, const XalanDOMString &msg)
    Report a comment to result file with specified severity.
- void logStatistic (int level, long lVal, double dVal, const XalanDOMString &msg)
    Logs out statistics to result file with specified severity.
- void logStatistic (int level, long lVal, double dVal, const char *msg)
- void addMetricToAttrs (char *desc, double theMetric, Hashtable &attrs)
- void logElementWAttrs (int level, const XalanDOMString &element, Hashtable &attrs, const XalanDOMString &msg)
    Logs out a element to results with specified severity.
- void logElementWAttrs (int level, const char *element, Hashtable &attrs, const char *msg)
- void logElement (int level, const XalanDOMString &element, const XalanDOMString &msg)
- void logElement (const XalanDOMString &element, const XalanDOMString &msg)
- void logArbitraryMessage (int level, const XalanDOMString &msg)
    Report an arbitrary XalanDOMString to result file with specified severity.
- void logCheckPass (const XalanDOMString &comment)
    Writes out a Pass record with comment.
- void logCheckAmbiguous (const XalanDOMString &comment)
    Writes out an ambiguous record with comment.
- void logCheckFail (const XalanDOMString &comment)
    Writes out a Fail record with comment.
- void logCheckFail (const XalanDOMString &test, const Hashtable &faildata, const Hashtable &actexp)
- void logCheckFail (const XalanDOMString &test, const Hashtable &actexp)
- void logErrorResult (const XalanDOMString &test, const XalanDOMString &reason)
- void logCheckErr (const XalanDOMString &comment)
    Writes out a Error record with comment.
- XalanDOMString & escapestring (const XalanDOMString &s, XalanDOMString &buffer)
    Escapes a XalanDOMString to remove <, >, ', &, and " so it's valid XML.

## Member Typedef Documentation

typedef FILE XalanXMLFileReporter::FileHandleType

typedef XalanMap<XalanDOMString, XalanDOMString> XalanXMLFileReporter::Hashtable

## Constructor & Destructor Documentation

XalanXMLFileReporter::XalanXMLFileReporter | ( | MemoryManagerType & | theManager,
|  | const XalanDOMString & | fileName
| ) |

## Member Function Documentation

void XalanXMLFileReporter::addMetricToAttrs | ( | char * | desc,
|  | double | theMetric,
|  | Hashtable & | attrs
| ) |

bool XalanXMLFileReporter::checkError | ( |  | ) |

void XalanXMLFileReporter::close | ( |  | ) |

XalanDOMString& XalanXMLFileReporter::escapestring | ( | const XalanDOMString & | s,
|  | XalanDOMString & | buffer
| ) |

  | Escapes a XalanDOMString to remove <, >, ', &, and " so it's valid XML. Stolen mostly from Xalan applet sample. Parameters:
  s | XalanDOMString to escape.
Returns: XalanDOMString that has been escaped.

void XalanXMLFileReporter::flush | ( |  | ) |

const XalanDOMString& XalanXMLFileReporter::getFileName | ( |  | ) | const

bool XalanXMLFileReporter::getFlushOnCaseClose | ( |  | ) |

MemoryManagerType& XalanXMLFileReporter::getMemoryManager | ( |  | ) |

bool XalanXMLFileReporter::initialize | ( | MemoryManagerType & | theManager | ) |

bool XalanXMLFileReporter::isReady | ( |  | ) |

void XalanXMLFileReporter::logArbitraryMessage | ( | int | level,
|  | const XalanDOMString & | msg
| ) |

  | Report an arbitrary XalanDOMString to result file with specified severity. Appends and prepends \n newline characters at the start and end of the message to separate it from the tags. Record format: <arbitrary level="##"><BR/> msg<BR/> </arbitrary> Parameters:
  level | severity or class of message.
  msg | arbitrary XalanDOMString to log out.

void XalanXMLFileReporter::logCheckAmbiguous | ( | const XalanDOMString & | comment | ) |

  | Writes out an ambiguous record with comment. Record format: <checkresult result="AMBG" desc="comment"/> Parameters:
  comment | comment to log with the ambg record.

void XalanXMLFileReporter::logCheckErr | ( | const XalanDOMString & | comment | ) |

  | Writes out a Error record with comment. Record format: <checkresult result="ERRR" desc="comment"/> Parameters:
  comment | comment to log with the error record.

void XalanXMLFileReporter::logCheckFail | ( | const XalanDOMString & | test,
|  | const Hashtable & | actexp
| ) |

void XalanXMLFileReporter::logCheckFail | ( | const XalanDOMString & | test,
|  | const Hashtable & | faildata,
|  | const Hashtable & | actexp
| ) |

void XalanXMLFileReporter::logCheckFail | ( | const XalanDOMString & | comment | ) |

  | Writes out a Fail record with comment. Record format: <checkresult result="FAIL" desc="comment"/> Parameters:
  comment | comment to log with the fail record.

void XalanXMLFileReporter::logCheckPass | ( | const XalanDOMString & | comment | ) |

  | Writes out a Pass record with comment. Record format: <checkresult result="PASS" desc="comment"/> Parameters:
  comment | comment to log with the pass record.

void XalanXMLFileReporter::logElement | ( | const XalanDOMString & | element,
|  | const XalanDOMString & | msg
| ) |

void XalanXMLFileReporter::logElement | ( | int | level,
|  | const XalanDOMString & | element,
|  | const XalanDOMString & | msg
| ) |

void XalanXMLFileReporter::logElementWAttrs | ( | int | level,
|  | const char * | element,
|  | Hashtable & | attrs,
|  | const char * | msg
| ) |

void XalanXMLFileReporter::logElementWAttrs | ( | int | level,
|  | const XalanDOMString & | element,
|  | Hashtable & | attrs,
|  | const XalanDOMString & | msg
| ) |

  | Logs out a element to results with specified severity. Uses user-supplied element name and attribute list. Currently attribute values and msg are forced .toString(). Also, 'level' is forced to be the first attribute of the element. Parameters:
  level | severity of message.
  element | name of enclosing element
  attrs | hash of name=value attributes; note that the caller must ensure they're legal XML
  msg | comment to log out.

void XalanXMLFileReporter::logErrorResult | ( | const XalanDOMString & | test,
|  | const XalanDOMString & | reason
| ) |

void XalanXMLFileReporter::logMessage | ( | int | level,
|  | const XalanDOMString & | msg
| ) |

  | Report a comment to result file with specified severity. Record format: <message level="##">msg</message> Parameters:
  level | severity or class of message.
  msg | comment to log out.

void XalanXMLFileReporter::logStatistic | ( | int | level,
|  | long | lVal,
|  | double | dVal,
|  | const char * | msg
| ) |

void XalanXMLFileReporter::logStatistic | ( | int | level,
|  | long | lVal,
|  | double | dVal,
|  | const XalanDOMString & | msg
| ) |

  | Logs out statistics to result file with specified severity. Record format: <statistic level="##" desc="msg"><longval>1234</longval><doubleval>1.234</doubleval></statistic> Parameters:
  level | severity of message.
  lVal | statistic in long format.
  dVal | statistic in double format.
  msg | comment to log out.

void XalanXMLFileReporter::logTestCaseClose | ( | const char * | msg,
|  | const char * | result
| ) |

void XalanXMLFileReporter::logTestCaseClose | ( | const XalanDOMString & | msg,
|  | const XalanDOMString & | result
| ) |

  | Report that a testcase has finished, and report it's result. Parameters:
  msg | message to log out
  result | result of testfile

void XalanXMLFileReporter::logTestCaseInit | ( | const char * | msg | ) |

void XalanXMLFileReporter::logTestCaseInit | ( | const XalanDOMString & | msg | ) |

void XalanXMLFileReporter::logTestFileClose | ( | const char * | msg,
|  | const char * | result
| ) |

void XalanXMLFileReporter::logTestFileClose | ( | const XalanDOMString & | msg,
|  | const XalanDOMString & | result
| ) |

  | Report that a testfile has finished, and report it's result. Parameters:
  msg | message to log out
  result | result of testfile

void XalanXMLFileReporter::logTestFileInit | ( | const char * | msg | ) |

void XalanXMLFileReporter::logTestFileInit | ( | const XalanDOMString & | msg | ) |

  | Report that a testfile has started. Parameters:
  msg | message to log out

void XalanXMLFileReporter::setFileName | ( | const char * | fileName,
|  | MemoryManagerType & | theManager
| ) |

void XalanXMLFileReporter::setFileName | ( | const XalanDOMString & | fileName | ) |

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

- XalanXMLFileReporter.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.