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