Bump version to 5.0-14
[LibreOffice.git] / xmlsecurity / source / xmlsec / saxhelper.hxx
blobbdd2099125da987e5a0be24fed2139bbcb73fd1b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_XMLSECURITY_SOURCE_XMLSEC_SAXHELPER_HXX
21 #define INCLUDED_XMLSECURITY_SOURCE_XMLSEC_SAXHELPER_HXX
23 #include "libxml/tree.h"
25 #include <com/sun/star/xml/sax/SAXException.hpp>
26 #include <com/sun/star/xml/sax/XAttributeList.hpp>
27 #include <com/sun/star/xml/sax/XLocator.hpp>
28 #include <com/sun/star/lang/XServiceInfo.hpp>
29 #include <com/sun/star/xml/csax/XMLAttribute.hpp>
31 /** This class represents a SAX handler which simply forwards to
32 the corresponding libxml API and translates parameter if necessary.
34 class SAXHelper
36 private :
37 xmlParserCtxtPtr m_pParserCtxt ;
38 xmlSAXHandlerPtr m_pSaxHandler ;
40 public:
41 SAXHelper( ) ;
42 virtual ~SAXHelper() ;
44 xmlNodePtr getCurrentNode() { return m_pParserCtxt->node;}
45 void setCurrentNode(const xmlNodePtr pNode);
46 xmlDocPtr getDocument() { return m_pParserCtxt->myDoc;}
48 void startDocument()
49 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
51 void endDocument()
52 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
54 void startElement(
55 const OUString& aName ,
56 const com::sun::star::uno::Sequence<
57 com::sun::star::xml::csax::XMLAttribute >& aAttributes )
58 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
60 void endElement( const OUString& aName )
61 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
63 void characters( const OUString& aChars )
64 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
66 void ignorableWhitespace( const OUString& aWhitespaces )
67 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
69 void processingInstruction(
70 const OUString& aTarget ,
71 const OUString& aData )
72 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
74 } ;
76 #endif
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */