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_XFastSAXSerializable_idl__
25#define __com_sun_star_xml_sax_XFastSAXSerializable_idl__
26
27#ifndef __com_sun_star_xml_sax_XFastDocumentHandler_idl__
28#include <com/sun/star/xml/sax/XFastDocumentHandler.idl>
29#endif
30
31#ifndef __com_sun_star_xml_sax_XFastTokenHandler_idl__
32#include <com/sun/star/xml/sax/XFastTokenHandler.idl>
33#endif
34
35#ifndef __com_sun_star_beans_StringPair_idl__
36#include <com/sun/star/beans/StringPair.idl>
37#endif
38
39#ifndef __com_sun_star_beans_Pair_idl__
40#include <com/sun/star/beans/Pair.idl>
41#endif
42
43module com { module sun { module star { module xml { module sax {
44
45//=============================================================================
46/** serializes a DOM tree by generating FastSAX events.
47
48    <p>
49    </p>
50
51    @since OpenOffice 3.1
52
53*/
54interface XFastSAXSerializable
55{
56
57	//-------------------------------------------------------------------------
58    /** serializes an object (e.g. a DOM tree) that represents an XML document
59        by generating fast SAX events.
60
61        @param  handler
62            the SAX event handler that should receive the generated events
63        @param  tokenHandler
64            the fast SAX token handler that is used to translate names
65        @param  namespaces
66            a list of namespace declarations that will be added to the root
67            element node of the XML document
68            <p>
69            This is necessary mostly because the DOM implementation does
70            not permit attaching namespaces declarations directly to nodes,
71            which may lead to duplicate namespace declarations on export,
72            and thus larger documents.
73            Note that the first part of each tuple is the prefix,
74            e.g. "office", and the second is the numeric namespace identifier.
75            </p>
76        @param  registerNamespaces
77            a list of namespace url / namespace token pairs. you need
78            to register all namespace in order to have them recognized
79            during export. Namespace tokens must be greater than
80            FastToken::NAMESPACE.
81            </p>
82
83        @throws com::sun::star::xml::sax::SAXException
84                 if serializing the XML document fails
85     */
86    void fastSerialize([in] sax::XFastDocumentHandler handler,
87                       [in] sax::XFastTokenHandler tokenHandler,
88                       [in] sequence< beans::StringPair > namespaces,
89                       [in] sequence< beans::Pair<string, long> > registerNamespaces)
90        raises( com::sun::star::xml::sax::SAXException );
91};
92
93}; }; }; }; };
94
95#endif
96