xref: /trunk/main/offapi/com/sun/star/xml/sax/XFastAttributeList.idl (revision ffd38472365e95f6a578737bc9a5eb0fac624a86)
1d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5d1766043SAndrew Rist * distributed with this work for additional information
6d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir *
11d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
13d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14d1766043SAndrew Rist * software distributed under the License is distributed on an
15d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17d1766043SAndrew Rist * specific language governing permissions and limitations
18d1766043SAndrew Rist * under the License.
19cdf0e10cSrcweir *
20d1766043SAndrew Rist *************************************************************/
21d1766043SAndrew Rist
22d1766043SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_xml_sax_XFastAttributeList_idl__
24cdf0e10cSrcweir#define __com_sun_star_xml_sax_XFastAttributeList_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
27cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir
30cdf0e10cSrcweir#ifndef __com_sun_star_xml_Attribute_idl__
31cdf0e10cSrcweir#include <com/sun/star/xml/Attribute.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir
34cdf0e10cSrcweir#ifndef __com_sun_star_xml_FastAttribute_idl__
35cdf0e10cSrcweir#include <com/sun/star/xml/FastAttribute.idl>
36cdf0e10cSrcweir#endif
37cdf0e10cSrcweir
38cdf0e10cSrcweir#ifndef __com_sun_star_xml_sax_SAXException_idl__
39cdf0e10cSrcweir#include <com/sun/star/xml/sax/SAXException.idl>
40cdf0e10cSrcweir#endif
41cdf0e10cSrcweir
42cdf0e10cSrcweir//=============================================================================
43cdf0e10cSrcweir
44cdf0e10cSrcweirmodule com {  module sun {  module star {  module xml {  module sax {
45cdf0e10cSrcweir
46cdf0e10cSrcweir//=============================================================================
47cdf0e10cSrcweir
48cdf0e10cSrcweir/** a container for the attributes of an xml element.
49cdf0e10cSrcweir
50*a893be29SPedro Giffuni    <br>Attributes are separated into known attributes and unknown attributes.
51cdf0e10cSrcweir    <p>Known attributes have a local name that is known to the <type>XFastTokenHandler</token>
52cdf0e10cSrcweir    registered at the <type>XFastParser</type> which created the sax event containing
53cdf0e10cSrcweir    this attributes. If an attribute also has a namespace, that must be registered
54cdf0e10cSrcweir    at the <type>XFastParser</type>, else this attribute is also unknown even if
55cdf0e10cSrcweir    the local name is known.
56cdf0e10cSrcweir */
57cdf0e10cSrcweirinterface XFastAttributeList: com::sun::star::uno::XInterface
58cdf0e10cSrcweir{
59cdf0e10cSrcweir    /** checks if an attribute is available.<br>
60cdf0e10cSrcweir
61cdf0e10cSrcweir        @param Token
62cdf0e10cSrcweir            contains the integer token from the <type>XFastTokenHandler</type>
63cdf0e10cSrcweir            registered at the <type>XFastParser</type>.<br>
64cdf0e10cSrcweir
65cdf0e10cSrcweir            If the attribute name has a namespace that was registered with the
66cdf0e10cSrcweir            <type>XFastParser</type>, Token contains the integer token of the
67cdf0e10cSrcweir            attributes local name from the <type>XFastTokenHandler</type> and
68cdf0e10cSrcweir            the integer token of the namespace combined with an arithmetic
69cdf0e10cSrcweir            <b>or</b> operation.
70cdf0e10cSrcweir
71cdf0e10cSrcweir        @returns
72cdf0e10cSrcweir            <TRUE/>, if the attribute is available
73cdf0e10cSrcweir    */
74cdf0e10cSrcweir    boolean hasAttribute( [in] long Token );
75cdf0e10cSrcweir
76cdf0e10cSrcweir    /** retrieves the token of an attributes value.<br>
77cdf0e10cSrcweir
78cdf0e10cSrcweir        @param Token
79cdf0e10cSrcweir            contains the integer token from the <type>XFastTokenHandler</type>
80cdf0e10cSrcweir            registered at the <type>XFastParser</type>.<br>
81cdf0e10cSrcweir
82cdf0e10cSrcweir            If the attribute name has a namespace that was registered with the
83cdf0e10cSrcweir            <type>XFastParser</type>, Token contains the integer token of the
84cdf0e10cSrcweir            attributes local name from the <type>XFastTokenHandler</type> and
85cdf0e10cSrcweir            the integer token of the namespace combined with an arithmetic
86cdf0e10cSrcweir            <b>or</b> operation.
87cdf0e10cSrcweir
88cdf0e10cSrcweir        @returns
89cdf0e10cSrcweir            The integer token of the value from the attribute or <const>FastToken::Invalid</const>
90cdf0e10cSrcweir
91cdf0e10cSrcweir        @throws SAXEXception
92cdf0e10cSrcweir            if the attribute is not available
93cdf0e10cSrcweir
94cdf0e10cSrcweir    */
95cdf0e10cSrcweir    long getValueToken( [in] long Token )
96cdf0e10cSrcweir        raises( SAXException );
97cdf0e10cSrcweir
98cdf0e10cSrcweir    /**retrieves the token of an attributes value.<br>
99cdf0e10cSrcweir
100cdf0e10cSrcweir        @param Token
101cdf0e10cSrcweir            contains the integer token from the <type>XFastTokenHandler</type>
102cdf0e10cSrcweir            registered at the <type>XFastParser</type>.<br>
103cdf0e10cSrcweir
104cdf0e10cSrcweir            If the attribute name has a namespace that was registered with the
105cdf0e10cSrcweir            <type>XFastParser</type>, Token contains the integer token of the
106cdf0e10cSrcweir            attributes local name from the <type>XFastTokenHandler</type> and
107cdf0e10cSrcweir            the integer token of the namespace combined with an arithmetic
108cdf0e10cSrcweir            <b>or</b> operation.
109cdf0e10cSrcweir
110cdf0e10cSrcweir        @param Default
111cdf0e10cSrcweir            This value will be returned if the attribute is not available
112cdf0e10cSrcweir
113cdf0e10cSrcweir        @returns
114cdf0e10cSrcweir            If the attribute is available it returns the integer token of the value
115cdf0e10cSrcweir            from the attribute or <const>FastToken::Invalid</const>.
116cdf0e10cSrcweir            If not the value of <param>Default</param> is returned.
117cdf0e10cSrcweir
118cdf0e10cSrcweir    */
119cdf0e10cSrcweir    long getOptionalValueToken( [in] long Token, [in] long Default );
120cdf0e10cSrcweir
121cdf0e10cSrcweir    /** retrieves the value of an attributes.<br>
122cdf0e10cSrcweir
123cdf0e10cSrcweir        @param Token
124cdf0e10cSrcweir            contains the integer token from the <type>XFastTokenHandler</type>
125cdf0e10cSrcweir            registered at the <type>XFastParser</type>.<br>
126cdf0e10cSrcweir
127cdf0e10cSrcweir            If the attribute name has a namespace that was registered with the
128cdf0e10cSrcweir            <type>XFastParser</type>, Token contains the integer token of the
129cdf0e10cSrcweir            attributes local name from the <type>XFastTokenHandler</type> and
130cdf0e10cSrcweir            the integer token of the namespace combined with an arithmetic
131cdf0e10cSrcweir            <b>or</b> operation.
132cdf0e10cSrcweir
133cdf0e10cSrcweir        @returns
134cdf0e10cSrcweir            The string value from the attribute.
135cdf0e10cSrcweir
136cdf0e10cSrcweir        @throws SAXEXception
137cdf0e10cSrcweir            if the attribute is not available
138cdf0e10cSrcweir
139cdf0e10cSrcweir    */
140cdf0e10cSrcweir    string getValue( [in] long Token )
141cdf0e10cSrcweir        raises( SAXException );
142cdf0e10cSrcweir
143cdf0e10cSrcweir    /** retrieves the value of an attributes.<br>
144cdf0e10cSrcweir
145cdf0e10cSrcweir        @param Token
146cdf0e10cSrcweir            contains the integer token from the <type>XFastTokenHandler</type>
147cdf0e10cSrcweir            registered at the <type>XFastParser</type>.<br>
148cdf0e10cSrcweir
149cdf0e10cSrcweir            If the attribute name has a namespace that was registered with the
150cdf0e10cSrcweir            <type>XFastParser</type>, Token contains the integer token of the
151cdf0e10cSrcweir            attributes local name from the <type>XFastTokenHandler</type> and
152cdf0e10cSrcweir            the integer token of the namespace combined with an arithmetic
153cdf0e10cSrcweir            <b>or</b> operation.
154cdf0e10cSrcweir
155cdf0e10cSrcweir        @returns
156cdf0e10cSrcweir            The string value from the attribute or an empty string if the
157cdf0e10cSrcweir            attribute is not available.
158cdf0e10cSrcweir    */
159cdf0e10cSrcweir    string getOptionalValue( [in] long Token );
160cdf0e10cSrcweir
161cdf0e10cSrcweir    /** returns a sequence of attributes which names and or namespaces URLS
162cdf0e10cSrcweir        can not be translated to tokens.
163cdf0e10cSrcweir    */
164cdf0e10cSrcweir    sequence< ::com::sun::star::xml::Attribute > getUnknownAttributes();
165cdf0e10cSrcweir
166cdf0e10cSrcweir    /** returns a sequence of attributes which names and or namespaces URLS
167cdf0e10cSrcweir        are translated to tokens.
168cdf0e10cSrcweir    */
169cdf0e10cSrcweir    sequence< ::com::sun::star::xml::FastAttribute > getFastAttributes();
170cdf0e10cSrcweir};
171cdf0e10cSrcweir
172cdf0e10cSrcweir//=============================================================================
173cdf0e10cSrcweir
174cdf0e10cSrcweir}; }; }; }; };
175cdf0e10cSrcweir
176cdf0e10cSrcweir#endif
177