1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XSAXSerializable.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __com_sun_star_xml_sax_XFastSAXSerializable_idl__
32 #define __com_sun_star_xml_sax_XFastSAXSerializable_idl__
34 #ifndef __com_sun_star_xml_sax_XFastDocumentHandler_idl__
35 #include
<com
/sun
/star
/xml
/sax
/XFastDocumentHandler.idl
>
38 #ifndef __com_sun_star_xml_sax_XFastTokenHandler_idl__
39 #include
<com
/sun
/star
/xml
/sax
/XFastTokenHandler.idl
>
42 #ifndef __com_sun_star_beans_StringPair_idl__
43 #include
<com
/sun
/star
/beans
/StringPair.idl
>
46 #ifndef __com_sun_star_beans_Pair_idl__
47 #include
<com
/sun
/star
/beans
/Pair.idl
>
50 module com
{ module sun
{ module star
{ module xml
{ module sax
{
52 //=============================================================================
53 /** serializes a DOM tree by generating FastSAX events.
61 interface XFastSAXSerializable
64 //-------------------------------------------------------------------------
65 /** serializes an object (e.g. a DOM tree) that represents an XML document
66 by generating fast SAX events.
69 the SAX event handler that should receive the generated events
71 the fast SAX token handler that is used to translate names
73 a list of namespace declarations that will be added to the root
74 element node of the XML document
76 This is necessary mostly because the DOM implementation does
77 not permit attaching namespaces declarations directly to nodes,
78 which may lead to duplicate namespace declarations on export,
79 and thus larger documents.
80 Note that the first part of each tuple is the prefix,
81 e.g. "office", and the second is the numeric namespace identifier.
83 @param registerNamespaces
84 a list of namespace url / namespace token pairs. you need
85 to register all namespace in order to have them recognized
86 during export. Namespace tokens must be greater than
90 @throws com::sun::star::xml::sax::SAXException
91 if serializing the XML document fails
93 void fastSerialize
([in] sax
::XFastDocumentHandler handler
,
94 [in] sax
::XFastTokenHandler tokenHandler
,
95 [in] sequence
< beans
::StringPair
> namespaces
,
96 [in] sequence
< beans
::Pair
<string, long> > registerNamespaces
)
97 raises
( com
::sun
::star
::xml
::sax
::SAXException
);