1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _XMLOFF_ELEMTRANSFORMERACTION_HXX
29 #define _XMLOFF_ELEMTRANSFORMERACTION_HXX
30 
31 #include "TransformerAction.hxx"
32 
33 enum XMLElemTransformerAction
34 {
35 	XML_ETACTION_EOT=XML_TACTION_EOT,	// uses for initialization only
36 	XML_ETACTION_COPY, 					// copy all (default)
37 										// for persistent elements: keep
38 										// elem content
39 	XML_ETACTION_COPY_TEXT, 			// copy all
40 										// for persistent elements: keep
41 										// text content
42 	XML_ETACTION_COPY_CONTENT, 			// ignore elem, process content
43 	XML_ETACTION_RENAME_ELEM, 			// rename element:
44 										// - param1: namespace +
45 										// 			 token of local name
46 	XML_ETACTION_RENAME_ELEM_PROC_ATTRS,// rename element and proc attr:
47 										// - param1: elem namespace +
48 										// 			 token of local name
49 										// - param2: attr acation map
50 	XML_ETACTION_RENAME_ELEM_ADD_ATTR,	// rename element and add attr:
51 										// - param1: elem namespace +
52 										// 			 token of local name
53 										// - param2: attr namespace +
54 										// 			 token of local name
55 										// - param3: attr value
56 	XML_ETACTION_RENAME_ELEM_ADD_PROC_ATTR,	// rename element and add attr:
57 										// - param1: elem namespace +
58 										// 			 token of local name
59 										// - param2: attr namespace +
60 										// 			 token of local name
61 										// - param3: attr value (low)
62 										//           attr action map (high)
63 	XML_ETACTION_RENAME_ELEM_COND, 		// rename element if child of another:
64 										// - param1: namespace +
65 										// 			 token of new local name
66 										// - param2: namespace +
67 										//           token of parent element
68 	XML_ETACTION_RENAME_ELEM_PROC_ATTRS_COND,// rename element and proc attr
69 										// if child of another:
70 										// - param1: elem namespace +
71 										// 			 token of new local name
72 										// - param2: attr acation map
73 										// - param3: namespace +
74 										//           token of parent element
75 	XML_ETACTION_PROC_ATTRS,			// proc attr:
76 										// - param1: attr acation map
77 	XML_ETACTION_MOVE_ATTRS_TO_ELEMS,	// turn some attributes into elems
78 										// - param1: action map specifying
79 										//   the attrs that shall be moved
80 	XML_ETACTION_MOVE_ELEMS_TO_ATTRS,	// turn some elems into attrs
81 										// - param1: action map specifying
82 										//   the elems that shall be moved
83 	XML_ETACTION_PROC_ATTRS_COND,		// proc attr if child of another:
84 										// - param1: namespace +
85 										//           token of parent element
86 										// - param2: attr acation map
87     XML_ETACTION_EXTRACT_CHARACTERS,    // takes the characters of the current
88                                         // element and all child elements
89                                         // and put them together into the
90                                         // current element
91                                         // the child elements are removed
92 	XML_ETACTION_USER_DEFINED=0x40000000,// user defined actions start here
93 	XML_ETACTION_END=XML_TACTION_END
94 };
95 
96 #endif	//  _XMLOFF_ELEMTRANSFORMERACTION_HXX
97