Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
XSLTransform.h
1 /*
2  * $Id$
3  * XSLTransform class interface
4  *
5  * This file is part of OTAWA
6  * Copyright (c) 2009, IRIT UPS.
7  *
8  * OTAWA is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * OTAWA is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with OTAWA; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 #ifndef ELM_XOM_XSLTRANFORM_H_
23 #define ELM_XOM_XSLTRANFORM_H_
24 
25 #include <elm/util/ErrorHandler.h>
26 #include <elm/xom/Nodes.h>
27 #include <elm/data/Vector.h>
28 #include <elm/data/ListMap.h>
29 
30 namespace elm { namespace xom {
31 
32 class Document;
33 class NodeFactory;
34 
35 // XMLException class
37 public:
38  inline XSLException(const string& message): MessageException(message) { }
39 };
40 
41 
42 // XSLTransform class
43 class XSLTransform: public ErrorBase {
44 public:
45  XSLTransform(Document *stylesheet);
46  XSLTransform(Document *stylesheet, NodeFactory *factory);
47 
48  void setParameter(const string& name, const string& value);
49  void setParameter(const string& name, const string& ns, const string& value);
50  Document *toDocument(const Nodes& nodes);
51  String toString(void);
55 
56 private:
57  static void handle_error(void *ctx, const char *msg, ...);
58  Document *ss;
59  NodeFactory *fact;
61 };
62 
63 } } // elm::xom
64 
65 #endif /* ELM_XOM_XSLTRANFORM_H_ */
elm::ErrorBase
Definition: ErrorHandler.h:49
elm::MessageException
Definition: MessageException.h:30
elm::ListMap< string, string >
elm::xom::NodeFactory
Definition: NodeFactory.h:27
elm::xom::Nodes
Definition: Nodes.h:32
elm::xom::String
Definition: String.h:35
elm::MessageException::message
virtual String message(void)
Definition: util_MessageException.cpp:50
elm::xom::XSLTransform::XSLTransform
XSLTransform(Document *stylesheet)
Definition: xom_XSLTransform.cpp:68
elm::xom::XSLTransform::toString
String toString(void)
Definition: xom_XSLTransform.cpp:153
elm::xom::XSLTransform::toDocument
Document * toDocument(const Nodes &nodes)
Definition: xom_XSLTransform.cpp:124
value
elm::xom::XSLTransform::transformDocument
Document * transformDocument(Document *in)
Definition: xom_XSLTransform.cpp:190
elm::t::in
typename type_info< T >::in_t in
Definition: type_info.h:283
elm::xom::XSLException::XSLException
XSLException(const string &message)
Definition: XSLTransform.h:38
elm
Definition: adapter.h:26
elm::xom::XSLTransform::transform
Nodes transform(Document *in)
Definition: xom_XSLTransform.cpp:179
elm::xom::Document
Definition: Document.h:20
elm::xom::XSLTransform
Definition: XSLTransform.h:43
elm::xom::XSLException
Definition: XSLTransform.h:36
elm::xom::XSLTransform::setParameter
void setParameter(const string &name, const string &value)
Definition: xom_XSLTransform.cpp:99