1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _XMLOFF_ELEMTRANSFORMERACTION_HXX 25 #define _XMLOFF_ELEMTRANSFORMERACTION_HXX 26 27 #include "TransformerAction.hxx" 28 29 enum XMLElemTransformerAction 30 { 31 XML_ETACTION_EOT=XML_TACTION_EOT, // uses for initialization only 32 XML_ETACTION_COPY, // copy all (default) 33 // for persistent elements: keep 34 // elem content 35 XML_ETACTION_COPY_TEXT, // copy all 36 // for persistent elements: keep 37 // text content 38 XML_ETACTION_COPY_CONTENT, // ignore elem, process content 39 XML_ETACTION_RENAME_ELEM, // rename element: 40 // - param1: namespace + 41 // token of local name 42 XML_ETACTION_RENAME_ELEM_PROC_ATTRS,// rename element and proc attr: 43 // - param1: elem namespace + 44 // token of local name 45 // - param2: attr acation map 46 XML_ETACTION_RENAME_ELEM_ADD_ATTR, // rename element and add attr: 47 // - param1: elem namespace + 48 // token of local name 49 // - param2: attr namespace + 50 // token of local name 51 // - param3: attr value 52 XML_ETACTION_RENAME_ELEM_ADD_PROC_ATTR, // rename element and add attr: 53 // - param1: elem namespace + 54 // token of local name 55 // - param2: attr namespace + 56 // token of local name 57 // - param3: attr value (low) 58 // attr action map (high) 59 XML_ETACTION_RENAME_ELEM_COND, // rename element if child of another: 60 // - param1: namespace + 61 // token of new local name 62 // - param2: namespace + 63 // token of parent element 64 XML_ETACTION_RENAME_ELEM_PROC_ATTRS_COND,// rename element and proc attr 65 // if child of another: 66 // - param1: elem namespace + 67 // token of new local name 68 // - param2: attr acation map 69 // - param3: namespace + 70 // token of parent element 71 XML_ETACTION_PROC_ATTRS, // proc attr: 72 // - param1: attr acation map 73 XML_ETACTION_MOVE_ATTRS_TO_ELEMS, // turn some attributes into elems 74 // - param1: action map specifying 75 // the attrs that shall be moved 76 XML_ETACTION_MOVE_ELEMS_TO_ATTRS, // turn some elems into attrs 77 // - param1: action map specifying 78 // the elems that shall be moved 79 XML_ETACTION_PROC_ATTRS_COND, // proc attr if child of another: 80 // - param1: namespace + 81 // token of parent element 82 // - param2: attr acation map 83 XML_ETACTION_EXTRACT_CHARACTERS, // takes the characters of the current 84 // element and all child elements 85 // and put them together into the 86 // current element 87 // the child elements are removed 88 XML_ETACTION_USER_DEFINED=0x40000000,// user defined actions start here 89 XML_ETACTION_END=XML_TACTION_END 90 }; 91 92 #endif // _XMLOFF_ELEMTRANSFORMERACTION_HXX 93