CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
ctkCmdLineModuleXslTransform.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  Library: CTK
4 
5  Copyright (c) German Cancer Research Center,
6  Division of Medical and Biological Informatics
7 
8  Licensed under the Apache License, Version 2.0 (the "License");
9  you may not use this file except in compliance with the License.
10  You may obtain a copy of the License at
11 
12  http://www.apache.org/licenses/LICENSE-2.0
13 
14  Unless required by applicable law or agreed to in writing, software
15  distributed under the License is distributed on an "AS IS" BASIS,
16  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  See the License for the specific language governing permissions and
18  limitations under the License.
19 
20 =============================================================================*/
21 
22 #ifndef __ctkCmdLineModuleXslTransform_h
23 #define __ctkCmdLineModuleXslTransform_h
24 
25 // CTK includes
26 #include "ctkCommandLineModulesCoreExport.h"
28 class ctkCmdLineModuleXslTransformPrivate;
29 
30 // Qt includes
31 class QIODevice;
32 
43 class CTK_CMDLINEMODULECORE_EXPORT ctkCmdLineModuleXslTransform
45 {
46 
47 public:
48 
49  ctkCmdLineModuleXslTransform(QIODevice* input = 0, QIODevice* output = 0);
51 
58  void setOutput(QIODevice* output);
59 
64  QIODevice* output() const;
65 
72  void setOutputSchema(QIODevice* output);
73 
78  bool formatXmlOutput() const;
79 
88  void setFormatXmlOutput(bool format);
89 
99  bool transform();
100 
110  void setXslTransformation(QIODevice* transformation);
111 
120  void setXslExtraTransformation(QIODevice* transformation);
121  void setXslExtraTransformations(const QList<QIODevice*>& transformations);
122 
130  void bindVariable(const QString& name, const QVariant& value);
131 
138  void setValidateOutput(bool validate);
139 
144  bool validateOutput() const;
145 
154  virtual bool error() const;
155 
164  virtual QString errorString() const;
165 
166 private:
167 
168  QScopedPointer<ctkCmdLineModuleXslTransformPrivate> d;
169 
170 };
171 
172 
173 #endif // CTKCMDLINEMODULEXSLTRANSFORM_H
ctkCmdLineModuleXmlValidator.h
ctkCmdLineModuleXmlValidator::errorString
virtual QString errorString() const
Get the error string.
QList
Definition: ctkCmdLineModuleBackend.h:30
ctkCmdLineModuleXmlValidator
Provides validation of an XML document against an XML schema.
Definition: ctkCmdLineModuleXmlValidator.h:39
ctkCmdLineModuleXmlValidator::error
virtual bool error() const
Get the error flag.
ctkCmdLineModuleXslTransform
Transforms a given XML input using an XML stylesheet.
Definition: ctkCmdLineModuleXslTransform.h:43