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