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#ifndef __com_sun_star_xml_sax_XFastAttributeList_idl__
24#define __com_sun_star_xml_sax_XFastAttributeList_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30#ifndef __com_sun_star_xml_Attribute_idl__
31#include <com/sun/star/xml/Attribute.idl>
32#endif
33
34#ifndef __com_sun_star_xml_FastAttribute_idl__
35#include <com/sun/star/xml/FastAttribute.idl>
36#endif
37
38#ifndef __com_sun_star_xml_sax_SAXException_idl__
39#include <com/sun/star/xml/sax/SAXException.idl>
40#endif
41
42//=============================================================================
43
44module com {  module sun {  module star {  module xml {  module sax {
45
46//=============================================================================
47
48/** a container for the attributes of an xml element.
49
50	<br>Attributes are separated into known attributes and unknown attributes.
51	<p>Known attributes have a local name that is known to the <type>XFastTokenHandler</token>
52	registered at the <type>XFastParser</type> which created the sax event containing
53	this attributes. If an attribute also has a namespace, that must be registered
54	at the <type>XFastParser</type>, else this attribute is also unknown even if
55	the local name is known.
56 */
57interface XFastAttributeList: com::sun::star::uno::XInterface
58{
59	/** checks if an attribute is available.<br>
60
61		@param Token
62			contains the integer token from the <type>XFastTokenHandler</type>
63			registered at the <type>XFastParser</type>.<br>
64
65			If the attribute name has a namespace that was registered with the
66			<type>XFastParser</type>, Token contains the integer token of the
67			attributes local name from the <type>XFastTokenHandler</type> and
68			the integer token of the namespace combined with an arithmetic
69			<b>or</b> operation.
70
71		@returns
72			<TRUE/>, if the attribute is available
73	*/
74	boolean hasAttribute( [in] long Token );
75
76	/** retrieves the token of an attributes value.<br>
77
78		@param Token
79			contains the integer token from the <type>XFastTokenHandler</type>
80			registered at the <type>XFastParser</type>.<br>
81
82			If the attribute name has a namespace that was registered with the
83			<type>XFastParser</type>, Token contains the integer token of the
84			attributes local name from the <type>XFastTokenHandler</type> and
85			the integer token of the namespace combined with an arithmetic
86			<b>or</b> operation.
87
88		@returns
89			The integer token of the value from the attribute or <const>FastToken::Invalid</const>
90
91		@throws SAXEXception
92			if the attribute is not available
93
94	*/
95	long getValueToken( [in] long Token )
96		raises( SAXException );
97
98	/**retrieves the token of an attributes value.<br>
99
100		@param Token
101			contains the integer token from the <type>XFastTokenHandler</type>
102			registered at the <type>XFastParser</type>.<br>
103
104			If the attribute name has a namespace that was registered with the
105			<type>XFastParser</type>, Token contains the integer token of the
106			attributes local name from the <type>XFastTokenHandler</type> and
107			the integer token of the namespace combined with an arithmetic
108			<b>or</b> operation.
109
110		@param Default
111			This value will be returned if the attribute is not available
112
113		@returns
114			If the attribute is available it returns the integer token of the value
115			from the attribute or <const>FastToken::Invalid</const>.
116			If not the value of <param>Default</param> is returned.
117
118	*/
119	long getOptionalValueToken( [in] long Token, [in] long Default );
120
121	/** retrieves the value of an attributes.<br>
122
123		@param Token
124			contains the integer token from the <type>XFastTokenHandler</type>
125			registered at the <type>XFastParser</type>.<br>
126
127			If the attribute name has a namespace that was registered with the
128			<type>XFastParser</type>, Token contains the integer token of the
129			attributes local name from the <type>XFastTokenHandler</type> and
130			the integer token of the namespace combined with an arithmetic
131			<b>or</b> operation.
132
133		@returns
134			The string value from the attribute.
135
136		@throws SAXEXception
137			if the attribute is not available
138
139	*/
140	string getValue( [in] long Token )
141		raises( SAXException );
142
143	/** retrieves the value of an attributes.<br>
144
145		@param Token
146			contains the integer token from the <type>XFastTokenHandler</type>
147			registered at the <type>XFastParser</type>.<br>
148
149			If the attribute name has a namespace that was registered with the
150			<type>XFastParser</type>, Token contains the integer token of the
151			attributes local name from the <type>XFastTokenHandler</type> and
152			the integer token of the namespace combined with an arithmetic
153			<b>or</b> operation.
154
155		@returns
156			The string value from the attribute or an empty string if the
157			attribute is not available.
158	*/
159	string getOptionalValue( [in] long Token );
160
161	/** returns a sequence of attributes which names and or namespaces URLS
162		can not be translated to tokens.
163	*/
164	sequence< ::com::sun::star::xml::Attribute > getUnknownAttributes();
165
166	/** returns a sequence of attributes which names and or namespaces URLS
167		are translated to tokens.
168	*/
169	sequence< ::com::sun::star::xml::FastAttribute > getFastAttributes();
170};
171
172//=============================================================================
173
174}; }; }; }; };
175
176#endif
177