Elm  1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
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/genstruct/Vector.h>
28 #include <elm/genstruct/AssocList.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) throw(XSLException);
46  XSLTransform(Document *stylesheet, NodeFactory *factory) throw(XSLException);
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) throw(XMLException);
51  String toString(void);
53  Nodes transform(Nodes in) throw(XSLException);
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_ */
XSLTransform(Document *stylesheet)
Definition: xom_XSLTransform.cpp:68
Nodes transform(Document *in)
Definition: xom_XSLTransform.cpp:179
Definition: XSLTransform.h:43
Definition: ErrorHandler.h:49
String toString(void)
Definition: xom_XSLTransform.cpp:153
sys::SystemInStream & in
Definition: system_SystemIO.cpp:95
Document * toDocument(const Nodes &nodes)
Definition: xom_XSLTransform.cpp:124
XSLException(const string &message)
Definition: XSLTransform.h:38
Definition: Nodes.h:52
value_t value(CString name, int value)
Definition: rtti.h:40
Definition: Document.h:20
void setParameter(const string &name, const string &value)
Definition: xom_XSLTransform.cpp:99
Definition: String.h:38
Document * transformDocument(Document *in)
Definition: xom_XSLTransform.cpp:190
Definition: XSLTransform.h:36
Definition: Nodes.h:32
virtual String message(void)
Definition: util_MessageException.cpp:50
Definition: MessageException.h:30
Definition: NodeFactory.h:27