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_sax_XSAXSerializable_idl__
25#define __com_sun_star_xml_sax_XSAXSerializable_idl__
26
27#ifndef __com_sun_star_xml_sax_XDocumentHandler_idl__
28#include <com/sun/star/xml/sax/XDocumentHandler.idl>
29#endif
30
31#ifndef __com_sun_star_beans_StringPair_idl__
32#include <com/sun/star/beans/StringPair.idl>
33#endif
34
35module com { module sun { module star { module xml { module sax {
36
37//=============================================================================
38/** serializes a DOM tree by generating SAX events.
39
40    <p>
41    </p>
42
43    @since OpenOffice 3.0
44
45*/
46interface XSAXSerializable
47{
48
49	//-------------------------------------------------------------------------
50    /** serializes an object (e.g. a DOM tree) that represents an XML document
51        by generating SAX events.
52
53        @param  handler
54            the SAX event handler that should receive the generated events
55        @param  namespaces
56            a list of namespace declarations that will be added to the root
57            element node of the XML document
58            <p>
59            This is necessary mostly because the DOM implementation does
60            not permit attaching namespaces declarations directly to nodes,
61            which may lead to duplicate namespace declarations on export,
62            and thus larger documents.
63            Note that the first part of each tuple is the prefix,
64            e.g. "office", and the second is the full namespace URI.
65            </p>
66
67        @throws com::sun::star::xml::sax::SAXException
68                 if serializing the XML document fails
69     */
70    void serialize([in] sax::XDocumentHandler handler,
71            [in] sequence< beans::StringPair > namespaces)
72        raises( com::sun::star::xml::sax::SAXException );
73
74};
75
76}; }; }; }; };
77
78#endif
79