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#if ! defined INCLUDED__com_sun_star_xml_input_XAttributes_idl__
24#define INCLUDED__com_sun_star_xml_input_XAttributes_idl__
25
26#include <com/sun/star/uno/XInterface.idl>
27
28
29module com { module sun { module star { module xml { module input {
30
31/** An element's attributes
32
33    @internal
34*/
35interface XAttributes : com::sun::star::uno::XInterface
36{
37    /** Gets the number of attributes.
38
39        @return
40                number of attributes
41    */
42    long getLength();
43
44    /** Gets attribute index passing a QName.
45
46        @param qName
47               QName
48        @return
49                attribute index or -1, if not found
50    */
51    long getIndexByQName( [in] string qName );
52
53    /** Gets attribute index passing a namespace uid and a localname.
54
55        @param uid
56               namespace uid
57        @param localName
58               localname
59        @return
60                attribute index or -1, if not found
61    */
62    long getIndexByUidName( [in] long uid, [in] string localName );
63
64    /** Gets the QName of an attribute.
65
66        @param nIndex
67               index
68        @return
69                QName of attribute or empty string, if invalid index
70    */
71    string getQNameByIndex( [in] long nIndex );
72
73    /** Gets the namespace uid of an attribute.
74
75        @param nIndex
76               index
77        @return
78                namespace uid of attribute or -1, if invalid index
79    */
80    long getUidByIndex( [in] long nIndex );
81
82    /** Gets the localname of an attribute.
83
84        @param nIndex
85               index
86        @return
87                localname of attribute or empty string, if invalid index
88    */
89    string getLocalNameByIndex( [in] long nIndex );
90
91    /** Gets the value of an attribute.
92
93        @param nIndex
94               index
95        @return
96                value string or empty string, if invalid index
97    */
98    string getValueByIndex( [in] long nIndex );
99
100    /** For convenience: Gets the value of an attribute passing uid, localname.
101
102        @param uid
103               namespace uid
104        @param localName
105               localname
106        @return
107                value string or empty string, if invalid uid/localname
108    */
109    string getValueByUidName( [in] long uid, [in] string localName );
110
111    /** Gets the type of an attribute, if possible.
112
113        @param nIndex
114               index
115        @return
116                type of attribute (if possible, else empty string)
117    */
118    string getTypeByIndex( [in] long nIndex );
119};
120
121}; }; }; }; };
122
123#endif
124