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
24#ifndef __com_sun_star_xml_dom_XNamedNodeMap_idl__
25#define __com_sun_star_xml_dom_XNamedNodeMap_idl__
26
27#ifndef __com_sun_star_uno_XInterface_idl__
28#include <com/sun/star/uno/XInterface.idl>
29#endif
30#ifndef __com_sun_star_xml_dom_DOMException_idl__
31#include <com/sun/star/xml/dom/DOMException.idl>
32#endif
33
34module com { module sun { module star { module xml { module dom {
35
36interface XNode;
37
38interface XNamedNodeMap : com::sun::star::uno::XInterface
39{
40
41    /**
42    The number of nodes in this map.
43    */
44    long getLength();
45
46    /**
47    Retrieves a node specified by local name
48    */
49    XNode getNamedItem([in] string name);
50
51    /**
52    Retrieves a node specified by local name and namespace URI.
53    */
54    XNode getNamedItemNS([in] string namespaceURI,[in]  string localName);
55
56    /**
57    Returns the indexth item in the map.
58    */
59    XNode item([in] long index);
60
61    /**
62    Removes a node specified by name.
63    Throws:
64    DOMException - NOT_FOUND_ERR: Raised if there is no node named name in this map.
65    NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
66    */
67    XNode removeNamedItem([in] string name) raises (DOMException);
68
69    /**
70    Removes a node specified by local name and namespace URI.
71    Throws:
72    DOMException - NOT_FOUND_ERR: Raised if there is no node with the specified namespaceURI and localName in this map.
73    NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
74    */
75    XNode removeNamedItemNS([in] string namespaceURI, [in] string localName) raises (DOMException);
76
77    /**
78    Adds a node using its nodeName attribute.
79    Throws:
80    DOMException - WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created this map.
81    NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
82    INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.
83    HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node doesn't belong in this NamedNodeMap. Examples would include trying to insert something other than an Attr node into an Element's map of attributes, or a non-Entity node into the DocumentType's map of Entities.
84    */
85    XNode setNamedItem([in] XNode arg) raises (DOMException);
86
87    /**
88    Adds a node using its namespaceURI and localName.
89    Throws:
90    DOMException - WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created this map.
91    NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
92    INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.
93    HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node doesn't belong in this NamedNodeMap. Examples would include trying to insert something other than an Attr node into an Element's map of attributes, or a non-Entity node into the DocumentType's map of Entities.
94    NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" feature, since namespaces were defined by XML.
95    */
96    XNode setNamedItemNS([in] XNode arg) raises (DOMException);
97};
98}; }; }; }; };
99
100#endif
101