1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_XMLOFF_SOURCE_TRANSFORM_ELEMTRANSFORMERACTION_HXX
21 #define INCLUDED_XMLOFF_SOURCE_TRANSFORM_ELEMTRANSFORMERACTION_HXX
23 #include "TransformerAction.hxx"
25 enum XMLElemTransformerAction
27 XML_ETACTION_EOT
=XML_TACTION_EOT
, // uses for initialization only
28 XML_ETACTION_COPY
, // copy all (default)
29 // for persistent elements: keep
31 XML_ETACTION_COPY_TEXT
, // copy all
32 // for persistent elements: keep
34 XML_ETACTION_COPY_CONTENT
, // ignore elem, process content
35 XML_ETACTION_RENAME_ELEM
, // rename element:
36 // - param1: namespace +
37 // token of local name
38 XML_ETACTION_RENAME_ELEM_PROC_ATTRS
,// rename element and proc attr:
39 // - param1: elem namespace +
40 // token of local name
41 // - param2: attr acation map
42 XML_ETACTION_RENAME_ELEM_ADD_ATTR
, // rename element and add attr:
43 // - param1: elem namespace +
44 // token of local name
45 // - param2: attr namespace +
46 // token of local name
47 // - param3: attr value
48 XML_ETACTION_RENAME_ELEM_ADD_PROC_ATTR
, // rename element and add attr:
49 // - param1: elem namespace +
50 // token of local name
51 // - param2: attr namespace +
52 // token of local name
53 // - param3: attr value (low)
54 // attr action map (high)
55 XML_ETACTION_RENAME_ELEM_COND
, // rename element if child of another:
56 // - param1: namespace +
57 // token of new local name
58 // - param2: namespace +
59 // token of parent element
60 XML_ETACTION_RENAME_ELEM_PROC_ATTRS_COND
,// rename element and proc attr
61 // if child of another:
62 // - param1: elem namespace +
63 // token of new local name
64 // - param2: attr acation map
65 // - param3: namespace +
66 // token of parent element
67 XML_ETACTION_PROC_ATTRS
, // proc attr:
68 // - param1: attr acation map
69 XML_ETACTION_MOVE_ATTRS_TO_ELEMS
, // turn some attributes into elems
70 // - param1: action map specifying
71 // the attrs that shall be moved
72 XML_ETACTION_MOVE_ELEMS_TO_ATTRS
, // turn some elems into attrs
73 // - param1: action map specifying
74 // the elems that shall be moved
75 XML_ETACTION_PROC_ATTRS_COND
, // proc attr if child of another:
76 // - param1: namespace +
77 // token of parent element
78 // - param2: attr acation map
79 XML_ETACTION_EXTRACT_CHARACTERS
, // takes the characters of the current
80 // element and all child elements
81 // and put them together into the
83 // the child elements are removed
84 XML_ETACTION_MOVE_TO_ATTR
, // turn elem into an attr:
85 // - param1: namespace +
86 // token of local name
87 XML_ETACTION_MOVE_TO_ATTR_RNG2ISO_DATETIME
, // turn elem into an attr and convert . to , in datetimes
88 // - param1: namespace +
89 // token of local name
90 XML_ETACTION_USER_DEFINED
=0x40000000,// user defined actions start here
91 XML_ETACTION_END
=XML_TACTION_END
94 #endif // INCLUDED_XMLOFF_SOURCE_TRANSFORM_ELEMTRANSFORMERACTION_HXX
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */