1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-11-06 23:49:25 +03:00
Files
libxslt/libxslt/xsltutils.h
Daniel Veillard 241bfda06e added configuration/version informations for Windows/MSC internal header
* libxslt/xsltwin32config.h[.in]: added configuration/version
  informations for Windows/MSC
* libxslt/libxslt.h libxslt/*.c: internal header to centralize
  includes switches
* libxslt/Makefile.am: added libxslt.h and xsltwin32config.h[.in]
* libxslt/*.[ch] libxslt/*.in: quite a bit of cleanup, especially
  the email addresses
* AUTHORS: added William
Daniel
2001-06-28 14:23:39 +00:00

110 lines
2.5 KiB
C

/*
* xsltutils.h: interfaces for the utilities module of the XSLT engine
*
* See Copyright for the status of this software.
*
* daniel@veillard.com
*/
#ifndef __XML_XSLTUTILS_H__
#define __XML_XSLTUTILS_H__
#include <libxml/xpath.h>
#include <libxml/xmlerror.h>
#include "xsltInternals.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* TODO:
*
* macro to flag unimplemented blocks
*/
#define TODO \
xsltGenericError(xsltGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
/**
* STRANGE:
*
* macro to flag that a problem was detected internally
*/
#define STRANGE \
xsltGenericError(xsltGenericErrorContext, \
"Internal error at %s:%d\n", \
__FILE__, __LINE__);
/**
* IS_XSLT_ELEM:
*
* Checks that the element pertains to XSLt namespace
*/
#define IS_XSLT_ELEM(n) \
(((n) != NULL) && ((n)->ns != NULL) && \
(xmlStrEqual((n)->ns->href, XSLT_NAMESPACE)))
/**
* IS_XSLT_NAME:
*
* Checks the value of an element in XSLT namespace
*/
#define IS_XSLT_NAME(n, val) \
(xmlStrEqual((n)->name, (const xmlChar *) (val)))
/*
* Our own version of namespaced atributes lookup
*/
xmlChar * xsltGetNsProp (xmlNodePtr node,
const xmlChar *name,
const xmlChar *nameSpace);
/*
* XSLT specific error and debug reporting functions
*/
extern xmlGenericErrorFunc xsltGenericError;
extern void *xsltGenericErrorContext;
extern xmlGenericErrorFunc xsltGenericDebug;
extern void *xsltGenericDebugContext;
void xsltMessage (xsltTransformContextPtr ctxt,
xmlNodePtr node,
xmlNodePtr inst);
void xsltSetGenericErrorFunc (void *ctx,
xmlGenericErrorFunc handler);
void xsltSetGenericDebugFunc (void *ctx,
xmlGenericErrorFunc handler);
/*
* Sorting ... this is definitely a temporary interface !
*/
void xsltDocumentSortFunction (xmlNodeSetPtr list);
void xsltDoSortFunction (xsltTransformContextPtr ctxt,
xmlNodePtr *sorts,
int nbsorts);
/*
* Output, reuse libxml I/O buffers
*/
int xsltSaveResultTo (xmlOutputBufferPtr buf,
xmlDocPtr result,
xsltStylesheetPtr style);
int xsltSaveResultToFilename (const char *URI,
xmlDocPtr result,
xsltStylesheetPtr style,
int compression);
int xsltSaveResultToFile (FILE *file,
xmlDocPtr result,
xsltStylesheetPtr style);
int xsltSaveResultToFd (int fd,
xmlDocPtr result,
xsltStylesheetPtr style);
#ifdef __cplusplus
}
#endif
#endif /* __XML_XSLTUTILS_H__ */