#include <stylesheet.h>
Public Types | |
typedef std::map< std::string, std::string > | param_type |
Type for passing parameters to the stylesheet. | |
Public Member Functions | |
stylesheet (const char *filename) | |
Create a new xslt::stylesheet object and load and parse the stylesheet in the given filename. | |
stylesheet (xml::document doc) | |
Create a new xslt::stylesheet object from an xml::document object that contains the parsed stylesheet. | |
~stylesheet (void) | |
Clean up after an xslt::stylesheet. | |
bool | apply (xml::document &doc, xml::document &result) |
Apply this stylesheet to the given XML document. | |
bool | apply (xml::document &doc, xml::document &result, const param_type &with_params) |
Apply this stylesheet to the given XML document. | |
xml::document & | apply (xml::document &doc) |
Apply this stylesheet to the given XML document. | |
xml::document & | apply (xml::document &doc, const param_type &with_params) |
Apply this stylesheet to the given XML document. | |
const std::string & | get_error_message (void) const |
If you used one of the xslt::stylesheet::apply member functions that return a bool, you can use this function to get the text message for the transformation error. |
You can use it to load in a stylesheet and then use that stylesheet to transform an XML document to something else.
|
Type for passing parameters to the stylesheet.
|
|
Create a new xslt::stylesheet object and load and parse the stylesheet in the given filename.
|
|
Create a new xslt::stylesheet object from an xml::document object that contains the parsed stylesheet. The given xml::document is passed by value. This is needed because the stylesheet will own the document and free it.
|
|
Clean up after an xslt::stylesheet.
|
|
Apply this stylesheet to the given XML document. The results document is returned. If there is an error during transformation, this function will throw a std::runtime_error exception. Each time you call this member function, the xml::document object that was returned from the last call becomes invalid. That is, of course, unless you copied it first.
|
|
Apply this stylesheet to the given XML document. The results document is returned. If there is an error during transformation, this function will throw a std::runtime_error exception. Each time you call this member function, the xml::document object that was returned from the last call becomes invalid. That is, of course, unless you copied it first.
|
|
Apply this stylesheet to the given XML document. The result document is placed in the second document parameter.
|
|
Apply this stylesheet to the given XML document. The result document is placed in the second document parameter.
|
|
If you used one of the xslt::stylesheet::apply member functions that return a bool, you can use this function to get the text message for the transformation error. If you are using one of the apply member functions that throws exceptions, this function should not be used. The text message for the transformation error will be given to the std::runtime_error constructor.
|