diff options
Diffstat (limited to 'offapi/com/sun/star/xml/sax')
25 files changed, 2414 insertions, 0 deletions
diff --git a/offapi/com/sun/star/xml/sax/FastShapeContextHandler.idl b/offapi/com/sun/star/xml/sax/FastShapeContextHandler.idl new file mode 100644 index 000000000000..fae70b3c84c0 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/FastShapeContextHandler.idl @@ -0,0 +1,45 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_FastShapeContextHandler_idl__ +#define __com_sun_star_xml_sax_FastShapeContextHandler_idl__ + +#ifndef __com_sun_star_xml_sax_XFastShapeContextHandler_idl__ +#include <com/sun/star/xml/sax/XFastShapeContextHandler.idl> +#endif + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +service FastShapeContextHandler : XFastShapeContextHandler +{ +}; + +}; }; }; }; }; + +#endif + diff --git a/offapi/com/sun/star/xml/sax/FastToken.idl b/offapi/com/sun/star/xml/sax/FastToken.idl new file mode 100644 index 000000000000..baec31bb7fb9 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/FastToken.idl @@ -0,0 +1,59 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_XFastToken_idl__ +#define __com_sun_star_xml_sax_XFastToken_idl__ + +#ifndef __com_sun_star_uno_XInterface_idl__ +#include <com/sun/star/uno/XInterface.idl> +#endif + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +//============================================================================ + +constants FastToken +{ + //------------------------------------------------------------------------- + + /** specifies an unknown token. + */ + const long DONTKNOW = -1; + + //------------------------------------------------------------------------- + + /** specifies the first namespace token + */ + const long NAMESPACE = 0x00010000; +}; + +//============================================================================= + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/xml/sax/FastTokenHandler.idl b/offapi/com/sun/star/xml/sax/FastTokenHandler.idl new file mode 100644 index 000000000000..e0020c33d883 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/FastTokenHandler.idl @@ -0,0 +1,43 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_FastTokenHandler_idl__ +#define __com_sun_star_xml_sax_FastTokenHandler_idl__ + +#include <com/sun/star/xml/sax/XFastTokenHandler.idl> + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +service FastTokenHandler : XFastTokenHandler +{ +}; + +}; }; }; }; }; + +#endif + diff --git a/offapi/com/sun/star/xml/sax/InputSource.idl b/offapi/com/sun/star/xml/sax/InputSource.idl new file mode 100644 index 000000000000..dafffbd31695 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/InputSource.idl @@ -0,0 +1,88 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_InputSource_idl__ +#define __com_sun_star_xml_sax_InputSource_idl__ + +#ifndef __com_sun_star_io_XInputStream_idl__ +#include <com/sun/star/io/XInputStream.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +//============================================================================= + +/** specifies the Datasource plus some additional information for the parser. + + <p>There are two places where the application will deliver this input + source to the parser: + </p> + <ul> + <li>as the argument of <method>XParser::parseStream</method></li> + <li>as the return value of <method>XEntityReslover::resolveEntity</method>. + </li> + </ul> + */ +published struct InputSource +{ + /** contains the byte input stream of the document. + */ + com::sun::star::io::XInputStream aInputStream; + + //------------------------------------------------------------------------- + + /** contains the encoding of the data stream. This is used by the parser + to do unicode conversions. + + <p>Note that in general you do not need to specify an encoding. + Either it is UTF-8 or UTF-16 which is recognized by the parser + or it is specified in the first line of the XML-File + ( e.g. <em>?xml encoding="EUC-JP"?</em> ).</p> + */ + string sEncoding; + + //------------------------------------------------------------------------- + + /** constains the public Id of the document, for example, needed in + exception-message strings. + */ + string sPublicId; + + //------------------------------------------------------------------------- + + /** contains the sytemID of the document. + */ + string sSystemId; +}; + +//============================================================================= + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/xml/sax/SAXException.idl b/offapi/com/sun/star/xml/sax/SAXException.idl new file mode 100644 index 000000000000..e7257352fa45 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/SAXException.idl @@ -0,0 +1,66 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_SAXException_idl__ +#define __com_sun_star_xml_sax_SAXException_idl__ + +#ifndef __com_sun_star_uno_Exception_idl__ +#include <com/sun/star/uno/Exception.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +//============================================================================= + +/** encapsulates the details of an XML parse error or warning. + + <p>This structure is a replacement for the Java class + <em>org.xml.sax.SAXException</em>. </p> + + <p>Some abbreviations: </p> + <ul> + <li>SAX = Simple API for XML </li> + <li>URI = Uniform Resource Identifier </li> + <li>DTD = document type definition </li> + */ +published exception SAXException: com::sun::star::uno::Exception +{ + //------------------------------------------------------------------------- + + /** This field may contain a wrapped exception. + */ + any WrappedException; + +}; + +//============================================================================= + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/xml/sax/SAXInvalidCharacterException.idl b/offapi/com/sun/star/xml/sax/SAXInvalidCharacterException.idl new file mode 100644 index 000000000000..162d8b3cbb83 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/SAXInvalidCharacterException.idl @@ -0,0 +1,54 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_SAXInvalidCharacterException_idl__ +#define __com_sun_star_xml_sax_SAXInvalidCharacterException_idl__ + +#ifndef __com_sun_star_xml_sax_SAXException_idl__ +#include <com/sun/star/xml/sax/SAXException.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +//============================================================================= + +/** stores information for locating the error in the original XML document. + + @see XLocater + */ +published exception SAXInvalidCharacterException: com::sun::star::xml::sax::SAXException +{ + +}; + +//============================================================================= + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/xml/sax/SAXParseException.idl b/offapi/com/sun/star/xml/sax/SAXParseException.idl new file mode 100644 index 000000000000..9c7993fb854c --- /dev/null +++ b/offapi/com/sun/star/xml/sax/SAXParseException.idl @@ -0,0 +1,78 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_SAXParseException_idl__ +#define __com_sun_star_xml_sax_SAXParseException_idl__ + +#ifndef __com_sun_star_xml_sax_SAXException_idl__ +#include <com/sun/star/xml/sax/SAXException.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +//============================================================================= + +/** stores information for locating the error in the original XML document. + + @see XLocater + */ +published exception SAXParseException: com::sun::star::xml::sax::SAXException +{ + //------------------------------------------------------------------------- + + /** contains the public identifier of the document where the exception + has occurred. + */ + string PublicId; + + //------------------------------------------------------------------------- + + /** contains the system identifier of the document. + */ + string SystemId; + + //------------------------------------------------------------------------- + + /** contains the line number in the document. + */ + long LineNumber; + + //------------------------------------------------------------------------- + + /** contains the column number in the document. + */ + long ColumnNumber; + +}; + +//============================================================================= + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/xml/sax/XAttributeList.idl b/offapi/com/sun/star/xml/sax/XAttributeList.idl new file mode 100644 index 000000000000..f7b24418410d --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XAttributeList.idl @@ -0,0 +1,102 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_XAttributeList_idl__ +#define __com_sun_star_xml_sax_XAttributeList_idl__ + +#ifndef __com_sun_star_uno_XInterface_idl__ +#include <com/sun/star/uno/XInterface.idl> +#endif + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +//============================================================================= + +/** specifies an element's attributes. + + <p>This interface describes a name-type-value triple which describes a + single attribute of a tag. Implementors are encouraged to implement the + <type scope="com::sun::star::util">XCloneable</type> interface also to + allow the user to make a copy of the instance. + + </p> + <p>This interface is an IDL version of the Java interface + <em>org.xml.sax.AttributeList</em>.</p> + */ +published interface XAttributeList: com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------- + + /** @returns + the number of attributes in this list. + */ + short getLength(); + + //------------------------------------------------------------------------- + + /** @returns + the name of an attribute in this list (by position). + */ + string getNameByIndex( [in] short i ); + + //------------------------------------------------------------------------- + + /** @returns + the type of an attribute in the list (by position). + Non-validating parsers may return CDATA only. + */ + string getTypeByIndex( [in] short i ); + + //------------------------------------------------------------------------- + + /** @returns + the type of an attribute in the list (by name). + Non-validating parsers may return CDATA only. + */ + string getTypeByName( [in] string aName ); + + //------------------------------------------------------------------------- + + /** @returns + the value of an attribute in the list (by position). + */ + string getValueByIndex( [in] short i ); + + //------------------------------------------------------------------------- + + /** @returns + the value of an attribute in the list (by name). + */ + string getValueByName( [in] string aName ); +}; + +//============================================================================= + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/xml/sax/XDTDHandler.idl b/offapi/com/sun/star/xml/sax/XDTDHandler.idl new file mode 100644 index 000000000000..184850386f11 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XDTDHandler.idl @@ -0,0 +1,79 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_XDTDHandler_idl__ +#define __com_sun_star_xml_sax_XDTDHandler_idl__ + +#ifndef __com_sun_star_uno_XInterface_idl__ +#include <com/sun/star/uno/XInterface.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +//============================================================================= + +/** receives events according to the DTD of the document. + + <p>The SAX parser may report these events in any order, regardless of the + order in which the notations and unparsed entities were declared; however, + all DTD events must be reported after the document handler's + <code>startDocument</code> event, and before the first <code>startElement</code> + event. It is up to the application to store the information for future + use (perhaps in a hash table or object tree). If the application encounters + attributes of type "NOTATION", "ENTITY", or "ENTITIES", it can use the + information that it obtained through this interface to find the entity + and/or notation that corresponds with the attribute value. + </p> + */ +published interface XDTDHandler: com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------- + + /** receives notification of a notation declaration event. + */ + void notationDecl( [in] string sName, + [in] string sPublicId, + [in] string sSystemId ); + + //------------------------------------------------------------------------- + + /** receives notification of an unparsed entity declaration event. + */ + void unparsedEntityDecl( [in] string sName, + [in] string sPublicId, + [in] string sSystemId, + [in] string sNotationName ); + +}; + +//============================================================================= + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/xml/sax/XDocumentHandler.idl b/offapi/com/sun/star/xml/sax/XDocumentHandler.idl new file mode 100644 index 000000000000..6586ba99a66b --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XDocumentHandler.idl @@ -0,0 +1,125 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_XDocumentHandler_idl__ +#define __com_sun_star_xml_sax_XDocumentHandler_idl__ + +#ifndef __com_sun_star_uno_XInterface_idl__ +#include <com/sun/star/uno/XInterface.idl> +#endif + +#ifndef __com_sun_star_xml_sax_SAXException_idl__ +#include <com/sun/star/xml/sax/SAXException.idl> +#endif + +#ifndef __com_sun_star_xml_sax_XAttributeList_idl__ +#include <com/sun/star/xml/sax/XAttributeList.idl> +#endif + +#ifndef __com_sun_star_xml_sax_XLocator_idl__ +#include <com/sun/star/xml/sax/XLocator.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +//============================================================================= + +/** receives notification of general document events. + + <p>This interface is an IDL version of the Java interface + <em>org.xml.sax.DocumentHandler</em> with some smaller + adaptations.</p> + */ +published interface XDocumentHandler: com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------- + + /** receives notification of the beginning of a document. + */ + void startDocument() + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** receives notification of the end of a document. + */ + void endDocument() + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** receives notification of the beginning of an element . + */ + void startElement( [in] string aName, + [in] com::sun::star::xml::sax::XAttributeList xAttribs ) + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** receives notification of the end of an element. + */ + void endElement( [in] string aName ) + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** receives notification of character data. + */ + void characters( [in] string aChars ) + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** receives notification of white space that can be ignored. + */ + void ignorableWhitespace( [in] string aWhitespaces ) + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** receives notification of a processing instruction. + */ + void processingInstruction( [in] string aTarget, + [in] string aData ) + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** receives an object for locating the origin of SAX document events. + */ + void setDocumentLocator( [in] com::sun::star::xml::sax::XLocator xLocator ) + raises( com::sun::star::xml::sax::SAXException ); + +}; + +//============================================================================= + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/xml/sax/XEntityResolver.idl b/offapi/com/sun/star/xml/sax/XEntityResolver.idl new file mode 100644 index 000000000000..0638f72ba94c --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XEntityResolver.idl @@ -0,0 +1,71 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_XEntityResolver_idl__ +#define __com_sun_star_xml_sax_XEntityResolver_idl__ + +#ifndef __com_sun_star_uno_XInterface_idl__ +#include <com/sun/star/uno/XInterface.idl> +#endif + +#ifndef __com_sun_star_xml_sax_InputSource_idl__ +#include <com/sun/star/xml/sax/InputSource.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +//============================================================================= + +/** makes it possible to modify the behaviour of resolving external + preferences. + + <p>Usually, the parser has a default behaviour of resolving external + references (See documentation of the parser implementation). + Use this interface to modify or reimplement this behaviour.</p> + */ +published interface XEntityResolver: com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------- + + /** @returns + <type>InputSource</type> for the external entity. + + <p>If <var>aInputStream</var> is a valid reference to an input stream, + the parser uses this <type>InputSource</type>. Otherwise the + parser seeks for the entity using its default behaviour. + */ + InputSource resolveEntity( [in] string sPublicId, [in] string sSystemId ); + +}; + +//============================================================================= + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/xml/sax/XErrorHandler.idl b/offapi/com/sun/star/xml/sax/XErrorHandler.idl new file mode 100644 index 000000000000..2d799fc6afdc --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XErrorHandler.idl @@ -0,0 +1,84 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_XErrorHandler_idl__ +#define __com_sun_star_xml_sax_XErrorHandler_idl__ + +#ifndef __com_sun_star_uno_XInterface_idl__ +#include <com/sun/star/uno/XInterface.idl> +#endif + +#ifndef __com_sun_star_xml_sax_SAXException_idl__ +#include <com/sun/star/xml/sax/SAXException.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +//============================================================================= + +/** is the basic interface for SAX error handlers. + + <p>If a SAX application needs to implement customized error handling, + it must implement this interface and then register an instance with the + SAX parser using the parser's <method>XParser::setErrorhandler</method> + method. The parser will then report all errors and warnings through this + interface. </p> + + <p>This interface is a slight adaption of the Java interface + <code>org.xml.sax.ErrorHandler</code>. In IDL, no exception can be passed + as an argument, so an <code>any</code> serves as the container. The type of the + exception is <type>SAXParseException</type> or an instance of a derived class.</p> + */ +published interface XErrorHandler: com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------- + /** receives notification of a recoverable error. + */ + void error( [in] any aSAXParseException ) + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + /** receives notification of a non-recoverable error. + */ + void fatalError( [in] any aSAXParseException ) + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + /** receives notification of a warning. + */ + void warning( [in] any aSAXParseException ) + raises( com::sun::star::xml::sax::SAXException ); + +}; + +//============================================================================= + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/xml/sax/XExtendedDocumentHandler.idl b/offapi/com/sun/star/xml/sax/XExtendedDocumentHandler.idl new file mode 100644 index 000000000000..5801a22a2517 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XExtendedDocumentHandler.idl @@ -0,0 +1,95 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_XExtendedDocumentHandler_idl__ +#define __com_sun_star_xml_sax_XExtendedDocumentHandler_idl__ + +#ifndef __com_sun_star_xml_sax_XDocumentHandler_idl__ +#include <com/sun/star/xml/sax/XDocumentHandler.idl> +#endif + +#ifndef __com_sun_star_xml_sax_SAXException_idl__ +#include <com/sun/star/xml/sax/SAXException.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +//============================================================================= + +/** this interface does not conform to the SAX-standard. + + <p>Note: Whether or not every callback is supported is dependent + on the parser implementation. + */ +published interface XExtendedDocumentHandler: com::sun::star::xml::sax::XDocumentHandler +{ + //------------------------------------------------------------------------- + /** receives notification about the start of a CDATA section in the + XML-source. + + <p>Any string comming in via character handler may include chars, + that would otherwise be interpreted as markup. </p> + */ + void startCDATA() + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + /** informs about the end of a CDATA-Section. + + <p>Note that <code>startCDATA/endCDATA</code> MUST NOT enclose any + <code>startElement/endElement</code>-call!</p> + */ + void endCDATA(); + + //------------------------------------------------------------------------- + /** receives notification about a comment in the XML-source. + */ + void comment( [in] string sComment ) + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + /** informs a writer that it is allowable to insert a line break and + indentation before the next <type>XDocumentHandler</type>-call. + */ + void allowLineBreak() + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + /** notifies that any characters that cannot be handled by other callback + methods are announced through this method. + */ + void unknown( [in] string sString ) + raises( com::sun::star::xml::sax::SAXException ); +}; + +//============================================================================= + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/xml/sax/XFastAttributeList.idl b/offapi/com/sun/star/xml/sax/XFastAttributeList.idl new file mode 100644 index 000000000000..a48e0e5b9337 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XFastAttributeList.idl @@ -0,0 +1,180 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_XFastAttributeList_idl__ +#define __com_sun_star_xml_sax_XFastAttributeList_idl__ + +#ifndef __com_sun_star_uno_XInterface_idl__ +#include <com/sun/star/uno/XInterface.idl> +#endif + +#ifndef __com_sun_star_xml_Attribute_idl__ +#include <com/sun/star/xml/Attribute.idl> +#endif + +#ifndef __com_sun_star_xml_FastAttribute_idl__ +#include <com/sun/star/xml/FastAttribute.idl> +#endif + +#ifndef __com_sun_star_xml_sax_SAXException_idl__ +#include <com/sun/star/xml/sax/SAXException.idl> +#endif + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +//============================================================================= + +/** a container for the attributes of an xml element. + + <br>Attributes are seperated into known attributes and unknown attributes. + <p>Known attributes have a local name that is known to the <type>XFastTokenHandler</token> + registered at the <type>XFastParser</type> which created the sax event containing + this attributes. If an attribute also has a namespace, that must be registered + at the <type>XFastParser</type>, else this attribute is also unknown even if + the local name is known. + */ +interface XFastAttributeList: com::sun::star::uno::XInterface +{ + /** checks if an attribute is available.<br> + + @param Token + contains the integer token from the <type>XFastTokenHandler</type> + registered at the <type>XFastParser</type>.<br> + + If the attribute name has a namespace that was registered with the + <type>XFastParser</type>, Token contains the integer token of the + attributes local name from the <type>XFastTokenHandler</type> and + the integer token of the namespace combined with an arithmetic + <b>or</b> operation. + + @returns + <TRUE/>, if the attribute is available + */ + boolean hasAttribute( [in] long Token ); + + /** retrieves the token of an attributes value.<br> + + @param Token + contains the integer token from the <type>XFastTokenHandler</type> + registered at the <type>XFastParser</type>.<br> + + If the attribute name has a namespace that was registered with the + <type>XFastParser</type>, Token contains the integer token of the + attributes local name from the <type>XFastTokenHandler</type> and + the integer token of the namespace combined with an arithmetic + <b>or</b> operation. + + @returns + The integer token of the value from the attribute or <const>FastToken::Invalid</const> + + @raises SAXEXception + if the attribute is not available + + */ + long getValueToken( [in] long Token ) + raises( SAXException ); + + /**retrieves the token of an attributes value.<br> + + @param Token + contains the integer token from the <type>XFastTokenHandler</type> + registered at the <type>XFastParser</type>.<br> + + If the attribute name has a namespace that was registered with the + <type>XFastParser</type>, Token contains the integer token of the + attributes local name from the <type>XFastTokenHandler</type> and + the integer token of the namespace combined with an arithmetic + <b>or</b> operation. + + @param Default + This value will be returned if the attribute is not available + + @returns + If the attribute is available it returns the integer token of the value + from the attribute or <const>FastToken::Invalid</const>. + If not the value of <param>Default</param> is returned. + + */ + long getOptionalValueToken( [in] long Token, [in] long Default ); + + /** retrieves the value of an attributes.<br> + + @param Token + contains the integer token from the <type>XFastTokenHandler</type> + registered at the <type>XFastParser</type>.<br> + + If the attribute name has a namespace that was registered with the + <type>XFastParser</type>, Token contains the integer token of the + attributes local name from the <type>XFastTokenHandler</type> and + the integer token of the namespace combined with an arithmetic + <b>or</b> operation. + + @returns + The string value from the attribute. + + @raises SAXEXception + if the attribute is not available + + */ + string getValue( [in] long Token ) + raises( SAXException ); + + /** retrieves the value of an attributes.<br> + + @param Token + contains the integer token from the <type>XFastTokenHandler</type> + registered at the <type>XFastParser</type>.<br> + + If the attribute name has a namespace that was registered with the + <type>XFastParser</type>, Token contains the integer token of the + attributes local name from the <type>XFastTokenHandler</type> and + the integer token of the namespace combined with an arithmetic + <b>or</b> operation. + + @returns + The string value from the attribute or an empty string if the + attribute is not available. + */ + string getOptionalValue( [in] long Token ); + + /** returns a sequence of attributes which names and or namespaces URLS + can not be translated to tokens. + */ + sequence< ::com::sun::star::xml::Attribute > getUnknownAttributes(); + + /** returns a sequence of attributes which names and or namespaces URLS + are translated to tokens. + */ + sequence< ::com::sun::star::xml::FastAttribute > getFastAttributes(); +}; + +//============================================================================= + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/xml/sax/XFastContextHandler.idl b/offapi/com/sun/star/xml/sax/XFastContextHandler.idl new file mode 100644 index 000000000000..22feebe6f5a0 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XFastContextHandler.idl @@ -0,0 +1,161 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_XFastContextHandler_idl__ +#define __com_sun_star_xml_sax_XFastContextHandler_idl__ + +#ifndef __com_sun_star_uno_XInterface_idl__ +#include <com/sun/star/uno/XInterface.idl> +#endif + +#ifndef __com_sun_star_xml_sax_SAXException_idl__ +#include <com/sun/star/xml/sax/SAXException.idl> +#endif + +#ifndef __com_sun_star_xml_sax_XFastAttributeList_idl__ +#include <com/sun/star/xml/sax/XFastAttributeList.idl> +#endif + +#ifndef __com_sun_star_xml_sax_XLocator_idl__ +#include <com/sun/star/xml/sax/XLocator.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +//============================================================================= + +/** receives notification of sax document events from a + <type>XFastParser</type>. + + @see XFastDocumentHandler + */ +interface XFastContextHandler: com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------- + + /** receives notification of the beginning of an element . + + @param Element + contains the integer token from the <type>XFastTokenHandler</type> + registered at the <type>XFastParser</type>.<br> + + If the element has a namespace that was registered with the + <type>XFastParser</type>, <param>Element</param> contains the integer + token of the elements local name from the <type>XFastTokenHandler</type> + and the integer token of the namespace combined with an arithmetic + <b>or</b> operation. + + @param Attribs + Contains a <type>XFastAttrbitueList</type> to access the attributes + from the element. + + */ + void startFastElement( [in] long Element, [in] XFastAttributeList Attribs ) + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** receives notification of the beginning of an unknown element . + + @param Namespace + contains the namespace url (not the prefix!) of this element. + @param Name + contains the elements local name. + @param Attribs + Contains a <type>XFastAttrbitueList</type> to access the attributes + from the element. + */ + void startUnknownElement( [in] string Namespace, [in] string Name, [in] XFastAttributeList Attribs ) + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** receives notification of the end of an known element. + @see startFastElement + */ + void endFastElement( [in] long Element ) + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** receives notification of the end of an kown element. + @see startUnknownElement + */ + void endUnknownElement( [in] string Namespace, [in] string Name ) + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** receives notification of the beginning of a known child element. + + @param Element + contains the integer token from the <type>XFastTokenHandler</type> + registered at the <type>XFastParser</type>. + + <br>If the element has a namespace that was registered with the + <type>XFastParser</type>, <param>Element</param> contains the + integer token of the elements local name from the + <type>XFastTokenHandler</type> and the integer token of the + namespace combined with an arithmetic <b>or</b> operation. + + @param Attribs + Contains a <type>XFastAttrbitueList</type> to access the attributes + from the element. + */ + XFastContextHandler createFastChildContext( [in] long Element, [in] XFastAttributeList Attribs ) + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** receives notification of the beginning of a unknown child element . + + @param Namespace + contains the namespace url (not the prefix!) of this element. + @param Name + contains the elements local name. + @param Attribs + Contains a <type>XFastAttrbitueList</type> to access the attributes + the element. + */ + XFastContextHandler createUnknownChildContext( [in] string Namespace, [in] string Name, [in] XFastAttributeList Attribs ) + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** receives notification of character data. + */ + void characters( [in] string aChars ) + raises( com::sun::star::xml::sax::SAXException ); + }; + +//============================================================================= + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/xml/sax/XFastDocumentHandler.idl b/offapi/com/sun/star/xml/sax/XFastDocumentHandler.idl new file mode 100644 index 000000000000..a4b5c94b8142 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XFastDocumentHandler.idl @@ -0,0 +1,89 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_XFastDocumentHandler_idl__ +#define __com_sun_star_xml_sax_XFastDocumentHandler_idl__ + +#ifndef __com_sun_star_uno_XInterface_idl__ +#include <com/sun/star/uno/XInterface.idl> +#endif + +#ifndef __com_sun_star_xml_sax_SAXException_idl__ +#include <com/sun/star/xml/sax/SAXException.idl> +#endif + +#ifndef __com_sun_star_xml_sax_XFastAttributeList_idl__ +#include <com/sun/star/xml/sax/XFastAttributeList.idl> +#endif + +#ifndef __com_sun_star_xml_sax_XFastContextHandler_idl__ +#include <com/sun/star/xml/sax/XFastContextHandler.idl> +#endif + +#ifndef __com_sun_star_xml_sax_XLocator_idl__ +#include <com/sun/star/xml/sax/XLocator.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +//============================================================================= + +/** receives notification of sax document events from a + <type>XFastParser</type> + */ +interface XFastDocumentHandler: XFastContextHandler +{ + //------------------------------------------------------------------------- + + /** called by the parser when parsing of an xml stream is started. + */ + void startDocument() + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** called by the parser after the last xml element of a stream is processed. + */ + void endDocument() + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** receives an object for locating the origin of SAX document events. + */ + void setDocumentLocator( [in] com::sun::star::xml::sax::XLocator xLocator ) + raises( com::sun::star::xml::sax::SAXException ); + +}; + +//============================================================================= + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/xml/sax/XFastParser.idl b/offapi/com/sun/star/xml/sax/XFastParser.idl new file mode 100644 index 000000000000..037aa01f913b --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XFastParser.idl @@ -0,0 +1,196 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_XFastParser_idl__ +#define __com_sun_star_xml_sax_XFastParser_idl__ + +#ifndef __com_sun_star_uno_XInterface_idl__ +#include <com/sun/star/uno/XInterface.idl> +#endif + +#ifndef __com_sun_star_xml_sax_InputSource_idl__ +#include <com/sun/star/xml/sax/InputSource.idl> +#endif + +#ifndef __com_sun_star_xml_sax_SAXException_idl__ +#include <com/sun/star/xml/sax/SAXException.idl> +#endif + +#ifndef __com_sun_star_io_IOException_idl__ +#include <com/sun/star/io/IOException.idl> +#endif + +#ifndef __com_sun_star_xml_sax_XFastDocumentHandler_idl__ +#include <com/sun/star/xml/sax/XFastDocumentHandler.idl> +#endif + +#ifndef __com_sun_star_xml_sax_XFastTokenHandler_idl__ +#include <com/sun/star/xml/sax/XFastTokenHandler.idl> +#endif + +#ifndef __com_sun_star_xml_sax_XErrorHandler_idl__ +#include <com/sun/star/xml/sax/XErrorHandler.idl> +#endif + +#ifndef __com_sun_star_xml_sax_XDTDHandler_idl__ +#include <com/sun/star/xml/sax/XDTDHandler.idl> +#endif + +#ifndef __com_sun_star_xml_sax_XEntityResolver_idl__ +#include <com/sun/star/xml/sax/XEntityResolver.idl> +#endif + +#ifndef __com_sun_star_lang_Locale_idl__ +#include <com/sun/star/lang/Locale.idl> +#endif + +#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ +#include <com/sun/star/lang/IllegalArgumentException.idl> +#endif + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +//============================================================================= + +/** specifies a SAX parser that uses integer values for known xml names + (elements, attributes and attribute values). The parser also handles + namespaces and allows to have individual contexts for each xml element. + + <p>Before parsing is possible you have to set your + <type>XFastDocumentHandler</type> using <member>setFastDocumentHandler</member>. + + <p>Parsing starts with calling <member>parseStream</member>. If the parser + finds a valid xml file with the given <type>InputSource</type>, it calls + <member>XFastDocumentHandler::startDocument</member> first. + + <p>This parser generates either 'fast' events that use integer token + values for namespaces, elements and attributes or 'unknown' events for + elements that are unknown. + + <p>A namespace is unknown if the namespace URL was not registered with + <member>registerNamespace</member>. + + <p>An element is unknown if no <type>XFastTokenHandler</type> is set + or if the <type>XFastTokenHandler</type> does not return a valid + identifier for the elements local name. An element is also unknown if + the elements local name is known but it uses a namespace that is unknown. + + <p>Setting a <type>XFastTokenHandler</type> with <member>setTokenHandler</member> + is optional, but without a <type>XFastTokenHandler</type> you will only + get unknown sax events. This can be usefull if you are only interested + in the namespace handling and/or the context feature. + + <p>For each element the parser sends a create child element event to the + elements parent context by calling + <member>XFastContextHandler::createFastChildContext</member> for known + elements or <member>XFastContextHandler::createUnknownChildContext</member> + for unknown elements. + <br>The parent context for the root element is the <type>XFastDocumentHandler</type> + itself. + + <p>If the parent context returns an empty reference, no further events for + the element and all of its childs are created. + + <p>If a valid context is returned this context gets a start event by a call to + <member>XFastContextHandler::startFastElement</member> for known elements or + <member>XFastContextHandler::startUnknownElement</member> for unknown elements. + + <p>After processing all its child elements the context gets an end event by a call to + <member>XFastContextHandler::endFastElement</member> for known elements or + <member>XFastContextHandler::endUnknownElement</member> for unknown elements. + + <p>It is valid to return one instance of <type>XFastContextHandler</type> more + than once. It is even possible to only use the <type>XFastDocumentHandler</type> + by always returning a reference to itself for each create child context event. + + <p>After the last element is processed the parser generates an end document + event at the <type>XFastDocumentHandler</type> by calling + <member>XFastDocumentHandler::endDocument</member>. + + @see http://wiki.services.openoffice.org/wiki/FastParser +*/ +interface XFastParser: com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------- + /** parses an XML document from a stream. + + <p>Set the desired handlers before calling this method.</p> + */ + void parseStream( [in] InputSource aInputSource ) + raises( SAXException, com::sun::star::io::IOException ); + + //------------------------------------------------------------------------- + + /** Application must register a document event handler to get + sax events for the parsed stream. + */ + void setFastDocumentHandler( [in] XFastDocumentHandler Handler ); + + //------------------------------------------------------------------------- + + /** must be registered to translate known xml names to integer tokens. + */ + void setTokenHandler( [in] XFastTokenHandler Handler ); + + //------------------------------------------------------------------------- + + /** registers a known namespace url with the given integer token.<br> + @param NamespaceToken + an integer token that must be greater than FastToken::NAMESPACE. + */ + void registerNamespace( [in] string NamespaceURL, [in] long NamespaceToken ) + raises( com::sun::star::lang::IllegalArgumentException ); + + //------------------------------------------------------------------------- + /** allows an application to register an error event handler. + + <p>Note that the error handler can throw an exception when an error or + warning occurs. Note that an exception is thrown by the parser when + an unrecoverable (fatal) error occurs.</p> + */ + void setErrorHandler( [in] XErrorHandler Handler ); + + //------------------------------------------------------------------------- + /** allows an application to register a DTD-Handler. + */ + void setEntityResolver( [in] XEntityResolver Resolver ); + + //------------------------------------------------------------------------- + /** sets a locale specified for localization of warnings and error messages. + + <p>Set the language of the error messages. Useful when the parsing + errors will be presented to the user.</p> + */ + void setLocale( [in] com::sun::star::lang::Locale locale ); +}; + +//============================================================================= + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/xml/sax/XFastSAXSerializable.idl b/offapi/com/sun/star/xml/sax/XFastSAXSerializable.idl new file mode 100644 index 000000000000..949d8ef2386b --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XFastSAXSerializable.idl @@ -0,0 +1,99 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_xml_sax_XFastSAXSerializable_idl__ +#define __com_sun_star_xml_sax_XFastSAXSerializable_idl__ + +#ifndef __com_sun_star_xml_sax_XFastDocumentHandler_idl__ +#include <com/sun/star/xml/sax/XFastDocumentHandler.idl> +#endif + +#ifndef __com_sun_star_xml_sax_XFastTokenHandler_idl__ +#include <com/sun/star/xml/sax/XFastTokenHandler.idl> +#endif + +#ifndef __com_sun_star_beans_StringPair_idl__ +#include <com/sun/star/beans/StringPair.idl> +#endif + +#ifndef __com_sun_star_beans_Pair_idl__ +#include <com/sun/star/beans/Pair.idl> +#endif + +module com { module sun { module star { module xml { module sax { + +//============================================================================= +/** serializes a DOM tree by generating FastSAX events. + + <p> + </p> + + @since OOo 3.1 + +*/ +interface XFastSAXSerializable +{ + + //------------------------------------------------------------------------- + /** serializes an object (e.g. a DOM tree) that represents an XML document + by generating fast SAX events. + + @param handler + the SAX event handler that should receive the generated events + @param tokenHandler + the fast SAX token handler that is used to translate names + @param namespaces + a list of namespace declarations that will be added to the root + element node of the XML document + <p> + This is necessary mostly because the DOM implementation does + not permit attaching namespaces declarations directly to nodes, + which may lead to duplicate namespace declarations on export, + and thus larger documents. + Note that the first part of each tuple is the prefix, + e.g. "office", and the second is the numeric namespace identifier. + </p> + @param registerNamespaces + a list of namespace url / namespace token pairs. you need + to register all namespace in order to have them recognized + during export. Namespace tokens must be greater than + FastToken::NAMESPACE. + </p> + + @throws com::sun::star::xml::sax::SAXException + if serializing the XML document fails + */ + void fastSerialize([in] sax::XFastDocumentHandler handler, + [in] sax::XFastTokenHandler tokenHandler, + [in] sequence< beans::StringPair > namespaces, + [in] sequence< beans::Pair<string, long> > registerNamespaces) + raises( com::sun::star::xml::sax::SAXException ); +}; + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/xml/sax/XFastSerializer.idl b/offapi/com/sun/star/xml/sax/XFastSerializer.idl new file mode 100644 index 000000000000..3c61d0ffcbf4 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XFastSerializer.idl @@ -0,0 +1,191 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_XFastSerializer_idl__ +#define __com_sun_star_xml_sax_XFastSerializer_idl__ + +#ifndef __com_sun_star_uno_XInterface_idl__ +#include <com/sun/star/uno/XInterface.idl> +#endif + +#ifndef __com_sun_star_xml_sax_SAXException_idl__ +#include <com/sun/star/xml/sax/SAXException.idl> +#endif + +#ifndef __com_sun_star_xml_sax_XFastDocumentHanlder_idl__ +#include <com/sun/star/xml/sax/XFastDocumentHandler.idl> +#endif + +#ifndef __com_sun_star_io_XOutputStream_idl__ +#include <com/sun/star/io/XOutputStream.idl> +#endif + +#ifndef __com_sun_star_xml_sax_XFastTokenHandler_idl__ +#include <com/sun/star/xml/sax/XFastTokenHandler.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +//============================================================================= + +/** receives notification of sax document events to write into an XOutputStream. + */ +interface XFastSerializer: com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------- + + /** called by the parser when parsing of an xml stream is started. + */ + void startDocument() + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** called by the parser after the last xml element of a stream is processed. + */ + void endDocument() + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** receives notification of the beginning of an element . + + @param Element + contains the integer token from the <type>XFastTokenHandler</type> + registered at the <type>XFastParser</type>.<br> + + If the element has a namespace that was registered with the + <type>XFastParser</type>, <param>Element</param> contains the integer + token of the elements local name from the <type>XFastTokenHandler</type> + and the integer token of the namespace combined with an arithmetic + <b>or</b> operation. + + @param Attribs + Contains a <type>XFastAttrbitueList</type> to access the attributes + from the element. + + */ + void startFastElement( [in] long Element, [in] XFastAttributeList Attribs ) + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** receives notification of the beginning of an unknown element . + + @param Namespace + contains the namespace url (not the prefix!) of this element. + @param Name + contains the elements local name. + @param Attribs + Contains a <type>XFastAttrbitueList</type> to access the attributes + from the element. + */ + void startUnknownElement( [in] string Namespace, [in] string Name, [in] XFastAttributeList Attribs ) + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** receives notification of the end of an known element. + @see startFastElement + */ + void endFastElement( [in] long Element ) + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** receives notification of the end of an known element. + @see startUnknownElement + */ + void endUnknownElement( [in] string Namespace, [in] string Name ) + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** receives notification of the beginning of a single element . + + @param Element + contains the integer token from the <type>XFastTokenHandler</type> + registered at the <type>XFastParser</type>.<br> + + If the element has a namespace that was registered with the + <type>XFastParser</type>, <param>Element</param> contains the integer + token of the elements local name from the <type>XFastTokenHandler</type> + and the integer token of the namespace combined with an arithmetic + <b>or</b> operation. + + @param Attribs + Contains a <type>XFastAttrbitueList</type> to access the attributes + from the element. + + */ + void singleFastElement( [in] long Element, [in] XFastAttributeList Attribs ) + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** receives notification of the beginning of a single unknown element . + + @param Namespace + contains the namespace url (not the prefix!) of this element. + @param Name + contains the elements local name. + @param Attribs + Contains a <type>XFastAttrbitueList</type> to access the attributes + from the element. + */ + void singleUnknownElement( [in] string Namespace, [in] string Name, [in] XFastAttributeList Attribs ) + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** receives notification of character data. + */ + void characters( [in] string aChars ) + raises( com::sun::star::xml::sax::SAXException ); + + //------------------------------------------------------------------------- + + /** + */ + void setOutputStream ( [in] com::sun::star::io::XOutputStream xOutputStream ) + /* raises( com::sun::star::xml::sax::SAXException ) */; + + //------------------------------------------------------------------------- + + /** + */ + void setFastTokenHandler ( [in] com::sun::star::xml::sax::XFastTokenHandler xFastTokenHandler ) + /* raises( com::sun::star::xml::sax::SAXException ) */; + }; + +//============================================================================= + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/xml/sax/XFastShapeContextHandler.idl b/offapi/com/sun/star/xml/sax/XFastShapeContextHandler.idl new file mode 100644 index 000000000000..27c615cbaa3c --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XFastShapeContextHandler.idl @@ -0,0 +1,62 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_XFastShapeContextHandler_idl__ +#define __com_sun_star_xml_sax_XFastShapeContextHandler_idl__ + +#include <com/sun/star/xml/sax/XFastContextHandler.idl> +#include <com/sun/star/drawing/XShape.idl> +#include <com/sun/star/drawing/XDrawPage.idl> +#include <com/sun/star/frame/XModel.idl> +#include <com/sun/star/io/XInputStream.idl> + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +//============================================================================= + +/** receives notification of sax document events from a + <type>XFastParser</type>. + + @see XFastDocumentHandler + */ +interface XFastShapeContextHandler: com::sun::star::xml::sax::XFastContextHandler +{ + [attribute, readonly] com::sun::star::drawing::XShape Shape; + [attribute] com::sun::star::drawing::XDrawPage DrawPage; + [attribute] com::sun::star::frame::XModel Model; + [attribute] com::sun::star::io::XInputStream InputStream; + [attribute] string RelationFragmentPath; + [attribute] long StartToken; + }; + +//============================================================================= + +}; }; }; }; }; + +#endif + diff --git a/offapi/com/sun/star/xml/sax/XFastTokenHandler.idl b/offapi/com/sun/star/xml/sax/XFastTokenHandler.idl new file mode 100644 index 000000000000..e4af64500b6c --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XFastTokenHandler.idl @@ -0,0 +1,93 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_XFastTokenHandler_idl__ +#define __com_sun_star_xml_sax_XFastTokenHandler_idl__ + +#ifndef __com_sun_star_uno_XInterface_idl__ +#include <com/sun/star/uno/XInterface.idl> +#endif + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +//============================================================================ + +/** interface to translate xml strings to integer tokens. + + <p>An instance of this interface can be registered at a <type>XFastParser</type>. + It should be able to translate all xml names (element local names, + attribute local names and constant attribute values) to integer tokens. + + A token value must be greater or equal to zero and less than + <const>FastToken::NAMESPACE</const>. If a string identifier is not known + to this instance, <const>FastToken::DONTKNOW</const> is returned. + */ +interface XFastTokenHandler: com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------- + + /** returns a integer token for the given string identifier. + + @returns + a unique integer token for the given String or <const>FastToken::DONTKNOW</const> + if the identifier is not known to this instance. + */ + long getToken( [in] string Identifier ); + + //------------------------------------------------------------------------- + + /** returns a string identifier for the given integer token. + */ + string getIdentifier( [in] long Token ); + + //------------------------------------------------------------------------- + + /** returns a integer token for the given string + + @param Identifier + the string given as a byte sequence encoded in UTF8 + + @returns + a unique integer token for the given String or <const>FastToken::DONTKNOW</const> + if the identifier is not known to this instance. + */ + long getTokenFromUTF8( [in] sequence< byte > Identifier ); + + //------------------------------------------------------------------------- + + /** returns a identifier for the given integer token as a byte + sequence encoded in UTF8. + */ + sequence< byte > getUTF8Identifier( [in] long Token ); +}; + +//============================================================================ + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/xml/sax/XLocator.idl b/offapi/com/sun/star/xml/sax/XLocator.idl new file mode 100644 index 000000000000..e77d83000f8a --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XLocator.idl @@ -0,0 +1,77 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_XLocator_idl__ +#define __com_sun_star_xml_sax_XLocator_idl__ + +#ifndef __com_sun_star_uno_XInterface_idl__ +#include <com/sun/star/uno/XInterface.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +//============================================================================ + +/** makes it possible to associate a SAX event with a document location. + + <p>This interface is an IDL version of the Java interface + <em>org.xml.sax.Locator</em>.</p> + */ +published interface XLocator: com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------- + /** @returns + the column number where the current document event ends. + */ + long getColumnNumber(); + + //------------------------------------------------------------------------- + /** @returns + the line number where the current document event ends. + */ + long getLineNumber(); + + //------------------------------------------------------------------------- + /** @returns + the public identifier for the current document event. + */ + string getPublicId(); + + //------------------------------------------------------------------------- + /** @returns + the system identifier for the current document event. + */ + string getSystemId(); +}; + +//============================================================================= + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/xml/sax/XParser.idl b/offapi/com/sun/star/xml/sax/XParser.idl new file mode 100644 index 000000000000..0d29af5d6562 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XParser.idl @@ -0,0 +1,126 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_xml_sax_XParser_idl__ +#define __com_sun_star_xml_sax_XParser_idl__ + +#ifndef __com_sun_star_uno_XInterface_idl__ +#include <com/sun/star/uno/XInterface.idl> +#endif + +#ifndef __com_sun_star_xml_sax_InputSource_idl__ +#include <com/sun/star/xml/sax/InputSource.idl> +#endif + +#ifndef __com_sun_star_xml_sax_SAXException_idl__ +#include <com/sun/star/xml/sax/SAXException.idl> +#endif + +#ifndef __com_sun_star_io_IOException_idl__ +#include <com/sun/star/io/IOException.idl> +#endif + +#ifndef __com_sun_star_xml_sax_XDocumentHandler_idl__ +#include <com/sun/star/xml/sax/XDocumentHandler.idl> +#endif + +#ifndef __com_sun_star_xml_sax_XErrorHandler_idl__ +#include <com/sun/star/xml/sax/XErrorHandler.idl> +#endif + +#ifndef __com_sun_star_xml_sax_XDTDHandler_idl__ +#include <com/sun/star/xml/sax/XDTDHandler.idl> +#endif + +#ifndef __com_sun_star_xml_sax_XEntityResolver_idl__ +#include <com/sun/star/xml/sax/XEntityResolver.idl> +#endif + +#ifndef __com_sun_star_lang_Locale_idl__ +#include <com/sun/star/lang/Locale.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module xml { module sax { + +//============================================================================= + +/** specifies a SAX parser. + + <p>This interface is an IDL version of the Java interface + <em>org.xml.sax.Parser</em> with some minor adaptations.</p> + */ +published interface XParser: com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------- + /** parses an XML document from a stream. + + <p>Set the desired handlers before calling this method.</p> + */ + void parseStream( [in] com::sun::star::xml::sax::InputSource aInputSource ) + raises( com::sun::star::xml::sax::SAXException, + com::sun::star::io::IOException ); + + //------------------------------------------------------------------------- + /** allows an application to register a document event handler. + */ + void setDocumentHandler( [in] com::sun::star::xml::sax::XDocumentHandler xHandler ); + + //------------------------------------------------------------------------- + /** allows an application to register an error event handler. + + <p>Note that the error handler can throw an exception when an error or + warning occurs. Note that an exception is thrown by the parser when + an unrecoverable (fatal) error occurs.</p> + */ + void setErrorHandler( [in] com::sun::star::xml::sax::XErrorHandler xHandler ); + + //------------------------------------------------------------------------- + /** allows an application to register a DTD-Handler. + */ + void setDTDHandler( [in] com::sun::star::xml::sax::XDTDHandler xHandler ); + + //------------------------------------------------------------------------- + /** allows an application to register a DTD-Handler. + */ + void setEntityResolver( [in] com::sun::star::xml::sax::XEntityResolver xResolver ); + + //------------------------------------------------------------------------- + /** sets a locale specified for localization of warnings and error messages. + + <p>Set the language of the error messages. Useful when the parsing + errors will be presented to the user.</p> + */ + void setLocale( [in] com::sun::star::lang::Locale locale ); +}; + +//============================================================================= + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/xml/sax/XSAXSerializable.idl b/offapi/com/sun/star/xml/sax/XSAXSerializable.idl new file mode 100644 index 000000000000..94af79fc1444 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/XSAXSerializable.idl @@ -0,0 +1,82 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_xml_sax_XSAXSerializable_idl__ +#define __com_sun_star_xml_sax_XSAXSerializable_idl__ + +#ifndef __com_sun_star_xml_sax_XDocumentHandler_idl__ +#include <com/sun/star/xml/sax/XDocumentHandler.idl> +#endif + +#ifndef __com_sun_star_beans_StringPair_idl__ +#include <com/sun/star/beans/StringPair.idl> +#endif + +module com { module sun { module star { module xml { module sax { + +//============================================================================= +/** serializes a DOM tree by generating SAX events. + + <p> + </p> + + @since OOo 3.0 + +*/ +interface XSAXSerializable +{ + + //------------------------------------------------------------------------- + /** serializes an object (e.g. a DOM tree) that represents an XML document + by generating SAX events. + + @param handler + the SAX event handler that should receive the generated events + @param namespaces + a list of namespace declarations that will be added to the root + element node of the XML document + <p> + This is necessary mostly because the DOM implementation does + not permit attaching namespaces declarations directly to nodes, + which may lead to duplicate namespace declarations on export, + and thus larger documents. + Note that the first part of each tuple is the prefix, + e.g. "office", and the second is the full namespace URI. + </p> + + @throws com::sun::star::xml::sax::SAXException + if serializing the XML document fails + */ + void serialize([in] sax::XDocumentHandler handler, + [in] sequence< beans::StringPair > namespaces) + raises( com::sun::star::xml::sax::SAXException ); + +}; + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/xml/sax/makefile.mk b/offapi/com/sun/star/xml/sax/makefile.mk new file mode 100644 index 000000000000..812d92cc9450 --- /dev/null +++ b/offapi/com/sun/star/xml/sax/makefile.mk @@ -0,0 +1,69 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ=..$/..$/..$/..$/.. + +PRJNAME=offapi + +TARGET=csssax +PACKAGE=com$/sun$/star$/xml$/sax + +# --- Settings ----------------------------------------------------- +.INCLUDE : $(PRJ)$/util$/makefile.pmk + +# ------------------------------------------------------------------------ + +IDLFILES=\ + InputSource.idl\ + SAXException.idl\ + SAXInvalidCharacterException.idl\ + SAXParseException.idl\ + XAttributeList.idl\ + XDocumentHandler.idl\ + XDTDHandler.idl\ + XEntityResolver.idl\ + XErrorHandler.idl\ + XExtendedDocumentHandler.idl\ + XLocator.idl\ + XParser.idl\ + XSAXSerializable.idl\ + XFastParser.idl\ + XFastDocumentHandler.idl\ + XFastContextHandler.idl\ + XFastSAXSerializable.idl\ + XFastSerializer.idl\ + XFastShapeContextHandler.idl\ + XFastTokenHandler.idl\ + XFastAttributeList.idl\ + FastToken.idl \ + FastShapeContextHandler.idl \ + FastTokenHandler.idl + +# ------------------------------------------------------------------ + +.INCLUDE : target.mk +.INCLUDE : $(PRJ)$/util$/target.pmk |