pleyo.com

/src/trunk2/BAL/Implementations/XML/LIBXSLT/BCXSLT.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2007 Pleyo.  All rights reserved.
00003  *
00004  * Redistribution and use in source and binary forms, with or without
00005  * modification, are permitted provided that the following conditions
00006  * are met:
00007  *
00008  * 1.  Redistributions of source code must retain the above copyright
00009  *     notice, this list of conditions and the following disclaimer.
00010  * 2.  Redistributions in binary form must reproduce the above copyright
00011  *     notice, this list of conditions and the following disclaimer in the
00012  *     documentation and/or other materials provided with the distribution.
00013  * 3.  Neither the name of Pleyo nor the names of
00014  *     its contributors may be used to endorse or promote products derived
00015  *     from this software without specific prior written permission.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
00018  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00019  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00020  * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
00021  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00022  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00023  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00024  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00025  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
00026  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00027  */
00042 #include "config.h"
00043 #include "PlatformString.h"
00044 
00045 #include "BIXSLT.h"
00046 #include "BTXML.h"
00047 #include <libxslt/documents.h>
00048 #include <libxml/tree.h>
00049 
00050 namespace BC
00051 {
00052     class BCXML;
00053     
00058 class BCXSLT : public BAL::BIXSLT {
00059     public:
00060         BCXSLT();
00061         ~BCXSLT();
00062 
00063         int isBlank( unsigned char *);
00064         int isXsltElem( BAL::BTXMLNode *);
00065         int isXlstName( BAL::BTXMLNode *, char * );
00066         unsigned char *xsltGetNsProp( BAL::BTXMLNode *node, const unsigned char *name, const unsigned char *nameSpace);
00067         BAL::BTXSLTStyleSheet* xsltLoadStylesheetPI( BAL::BTXMLDoc *doc );
00068         BAL::BTXSLTStyleSheet* xsltParseStylesheetDoc( BAL::BTXMLDoc *doc );
00069         void setLoaderFunc( BAL::BIXSLTDocLoaderFunc f );
00070         int xsltSaveResultTo( BAL::BTXMLOutputBuffer *buf, BAL::BTXMLDoc *result, BAL::BTXSLTStyleSheet *style);
00071         void getImportPtr( const unsigned char *res, BAL::BTXSLTStyleSheet *style );
00072         BAL::BTXSLTTransformContext *xsltNewTransformContext( BAL::BTXSLTStyleSheet *style, BAL::BTXMLDoc *doc );
00073         int xsltQuoteUserParams( BAL::BTXSLTTransformContext *ctxt, const char **params);
00074         BAL::BTXMLDoc *xsltApplyStylesheetUser( BAL::BTXSLTStyleSheet *style,
00075                                             BAL::BTXMLDoc *doc,
00076                                             const char **params,
00077                                             const char *output,
00078                                             FILE * profile,
00079                                             BAL::BTXSLTTransformContext *userCtxt);
00080         void xsltFreeTransformContext( BAL::BTXSLTTransformContext *ctxt );
00081         void xsltFreeStylesheet( BAL::BTXSLTStyleSheet *sheet );
00082         static xmlDocPtr XSLTDocLoaderFunc( const xmlChar *URI,
00083                                             xmlDictPtr dict,
00084                                             int options,
00085                                             void *ctxt,
00086                                             xsltLoadType type );
00087     private:
00088         BAL::BTXSLTStyleSheet *m_sheet;
00089         BAL::BTXSLTTransformContext *m_trans;
00090         xsltStylesheetPtr m_xsltsheet;
00091         xsltTransformContextPtr m_xsltTransform;
00092         BCXML *m_xml;
00093     };
00094 }

Generated on Wed Nov 21 20:04:16 2007 for Origyn Web Browser by Doxygen 1.5.3

pleyo.com
pleyo.com