CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Libs
CommandLineModules
Core
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"
27
#include "
ctkCmdLineModuleXmlValidator.h
"
28
class
ctkCmdLineModuleXslTransformPrivate;
29
30
// Qt includes
31
class
QIODevice;
32
43
class
CTK_CMDLINEMODULECORE_EXPORT
ctkCmdLineModuleXslTransform
44
:
public
ctkCmdLineModuleXmlValidator
45
{
46
47
public
:
48
49
ctkCmdLineModuleXslTransform
(QIODevice* input = 0, QIODevice* output = 0);
50
virtual
~ctkCmdLineModuleXslTransform
();
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
QList
Definition:
ctkCmdLineModuleBackend.h:30
ctkCmdLineModuleXmlValidator
Provides validation of an XML document against an XML schema.
Definition:
ctkCmdLineModuleXmlValidator.h:40
ctkCmdLineModuleXslTransform
Transforms a given XML input using an XML stylesheet.
Definition:
ctkCmdLineModuleXslTransform.h:45
ctkCmdLineModuleXslTransform::bindVariable
void bindVariable(const QString &name, const QVariant &value)
Binds the variable name to the value so that $name can be used from within the query to refer to the ...
ctkCmdLineModuleXslTransform::formatXmlOutput
bool formatXmlOutput() const
Returns true if the XSL output will be formatted.
ctkCmdLineModuleXslTransform::errorString
virtual QString errorString() const
Returns the error message if any.
ctkCmdLineModuleXslTransform::setOutputSchema
void setOutputSchema(QIODevice *output)
Set an XML schema for output validation.
ctkCmdLineModuleXslTransform::~ctkCmdLineModuleXslTransform
virtual ~ctkCmdLineModuleXslTransform()
ctkCmdLineModuleXslTransform::transform
bool transform()
Transforms an XML input via a XSL transformation.
ctkCmdLineModuleXslTransform::output
QIODevice * output() const
Get the output device to which the transformation will be written.
ctkCmdLineModuleXslTransform::error
virtual bool error() const
Returns true if an error occured.
ctkCmdLineModuleXslTransform::ctkCmdLineModuleXslTransform
ctkCmdLineModuleXslTransform(QIODevice *input=0, QIODevice *output=0)
ctkCmdLineModuleXslTransform::setOutput
void setOutput(QIODevice *output)
Set the output device to which the transformation will be written.
ctkCmdLineModuleXslTransform::setXslTransformation
void setXslTransformation(QIODevice *transformation)
Sets the XSL transformation.
ctkCmdLineModuleXslTransform::setFormatXmlOutput
void setFormatXmlOutput(bool format)
Formats the XSL output to be human-readable.
ctkCmdLineModuleXslTransform::setXslExtraTransformations
void setXslExtraTransformations(const QList< QIODevice * > &transformations)
ctkCmdLineModuleXslTransform::setXslExtraTransformation
void setXslExtraTransformation(QIODevice *transformation)
XSL to be injected in the main XSL.
ctkCmdLineModuleXslTransform::setValidateOutput
void setValidateOutput(bool validate)
Sets the output validation mode.
ctkCmdLineModuleXslTransform::validateOutput
bool validateOutput() const
Get the output validation mode.
ctkCmdLineModuleXmlValidator.h
Generated on Mon Aug 9 2021 00:00:00 for CTK by
1.9.1