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_PROC_ATTRS_COND
,// rename element and proc attr
56 // if child of another:
57 // - param1: elem namespace +
58 // token of new local name
59 // - param2: attr acation map
60 // - param3: namespace +
61 // token of parent element
62 XML_ETACTION_PROC_ATTRS
, // proc attr:
63 // - param1: attr acation map
64 XML_ETACTION_MOVE_ATTRS_TO_ELEMS
, // turn some attributes into elems
65 // - param1: action map specifying
66 // the attrs that shall be moved
67 XML_ETACTION_MOVE_ELEMS_TO_ATTRS
, // turn some elems into attrs
68 // - param1: action map specifying
69 // the elems that shall be moved
70 XML_ETACTION_PROC_ATTRS_COND
, // proc attr if child of another:
71 // - param1: namespace +
72 // token of parent element
73 // - param2: attr acation map
74 XML_ETACTION_EXTRACT_CHARACTERS
, // takes the characters of the current
75 // element and all child elements
76 // and put them together into the
78 // the child elements are removed
79 XML_ETACTION_MOVE_TO_ATTR
, // turn elem into an attr:
80 // - param1: namespace +
81 // token of local name
82 XML_ETACTION_MOVE_TO_ATTR_RNG2ISO_DATETIME
, // turn elem into an attr and convert . to , in datetimes
83 // - param1: namespace +
84 // token of local name
85 XML_ETACTION_USER_DEFINED
=0x40000000// user defined actions start here
88 #endif // INCLUDED_XMLOFF_SOURCE_TRANSFORM_ELEMTRANSFORMERACTION_HXX
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */