diff --git a/ChangeLog b/ChangeLog index ecc11381..57bab637 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu May 3 19:02:21 CEST 2001 Daniel Veillard + + * TODO configure.in libxslt.spec.in: getting ready for 0.9.0 + release + * doc/html/* doc/xslt.html: updated and regenerated the docs + Thu May 3 17:56:55 CEST 2001 Daniel Veillard * xsltutils.[ch] transform.c: implemented multiple levels of diff --git a/TODO b/TODO index bb4c72c0..ce860154 100644 --- a/TODO +++ b/TODO @@ -11,9 +11,6 @@ Design: - seems that saving back XSLT stylesheet from a compiled form might be a bit ugly ... -Import: - - ID and Key support: -> done but namespace support in keys is not defined -> make sure keys are recomputed on new document input @@ -35,7 +32,6 @@ Support Attribute value templates: a small API redesign Sorting: - -> add support for imbricated sorts -> add lang and case-order -> add foreign sorting functions (interfaces ?). @@ -93,6 +89,9 @@ Support Attribute value templates: -> optimization by checking their existence at stylesheet parse time. => done when building the preproc function +Sorting: + -> add support for imbricated sorts + => done but not well tested. Separate util module: -> macros, config, verbosity ? diff --git a/configure.in b/configure.in index 6332e284..70a98275 100644 --- a/configure.in +++ b/configure.in @@ -1,8 +1,23 @@ AC_INIT(libxslt/xslt.c) -VERSION=0.8.0 +LIBXSLT_MAJOR_VERSION=0 +LIBXSLT_MINOR_VERSION=9 +LIBXSLT_MICRO_VERSION=0 PACKAGE=libxslt +LIBXSLT_VERSION=$LIBXSLT_MAJOR_VERSION.$LIBXSLT_MINOR_VERSION.$LIBXSLT_MICRO_VERSION +LIBXSLT_VERSION_INFO=`expr $LIBXSLT_MAJOR_VERSION + $LIBXSLT_MINOR_VERSION`:$LIBXSLT_MICRO_VERSION:$LIBXSLT_MINOR_VERSION + +LIBXSLT_VERSION_NUMBER=`expr $LIBXSLT_MAJOR_VERSION \* 10000 + $LIBXSLT_MINOR_VERSION \* 100 + $LIBXSLT_MICRO_VERSION` + +AC_SUBST(LIBXSLT_MAJOR_VERSION) +AC_SUBST(LIBXSLT_MINOR_VERSION) +AC_SUBST(LIBXSLT_MICRO_VERSION) +AC_SUBST(LIBXSLT_VERSION) +AC_SUBST(LIBXSLT_VERSION_INFO) +AC_SUBST(LIBXSLT_VERSION_NUMBER) +VERSION=${LIBXSLT_VERSION} + AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define) AM_MAINTAINER_MODE @@ -104,7 +119,7 @@ dnl dnl find libxml dnl XML_CONFIG="xml2-config" -AC_MSG_CHECKING(for libxml libraries >= 2.3.7) +AC_MSG_CHECKING(for libxml libraries >= 2.3.8) if test "x$LIBXML_PREFIX" != "x" then if ${LIBXML_PREFIX}/bin/xml2-config --libs print > /dev/null 2>&1 @@ -121,13 +136,13 @@ dnl if test "x$XML_CONFIG" != "x" then vers=`$XML_CONFIG --version | sed -e 's/libxml //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` - if test "$vers" -ge 2003007 + if test "$vers" -ge 2003008 then LIBXML_LIBS="`$XML_CONFIG --libs`" LIBXML_CFLAGS="`$XML_CONFIG --cflags`" AC_MSG_RESULT(found) else - AC_MSG_ERROR(You need at least libxml2 2.3.7 for this version of libxslt) + AC_MSG_ERROR(You need at least libxml2 2.3.8 for this version of libxslt) fi else AC_MSG_ERROR(Could not find libxml2 anywhere, check ftp://xmlsoft.org/.) diff --git a/doc/html/libxslt-attributes.html b/doc/html/libxslt-attributes.html index 5c83a6c2..7d4a9dd3 100644 --- a/doc/html/libxslt-attributes.html +++ b/doc/html/libxslt-attributes.html @@ -121,7 +121,7 @@ NAME="LIBXSLT-ATTRIBUTES" >

Name

Synopsis

Description

Details

style: :cur: :

style: :

ctxt: :node: :inst: :attributes: :ctxt: :nargs: :ctxt: :nargs: :ctxt: :nargs: :ctxt: :nargs: :ctxt: :nargs: :ctxt: :nargs: :ctxt: :nargs: :ctxt: :nargs: :ctxt: :nargs: :ctxt: :

Name

Synopsis

Description

Details

res: :style: :name: :

res: :style: :name: :

style: :cur: :

style: :cur: :

style: :

ctxt: :node: :

ctxt: :name: :nameURI: :

Name

Synopsis

Description

Details

style: :name: :nameURI: :match: :use: :

ctxt: :name: :nameURI: :value: :

ctxt: :doc: :

style: :

doc: :

Name

Synopsis

Description

Details

style: :node: :

ctxt: :cur: :ns: :out: :

ctxt: :cur: :URI: :prefix: :out: :

ctxt: :node: :cur: :

style: :

Name

Synopsis

Description

Details

Param1: :Param2: :Param3: :Param4: :

Param1: :Param2: :Param3: :pattern: :doc: :node: :comp: :ctxt: :node: :comp: :style: :cur: :mode: :modeURI: :ctxt: :node: :style: :style: :style: :ctxt: :node: :pattern: :xmlXPathCompExprPtr comp); +> comp, + xmlNsPtr *nsList, + int nsNr); xmlCharxsltEvalStaticAttrValueTemplate (xsltTransformContextPtr ctxt, +HREF="libxslt-xsltinternals.html#XSLTSTYLESHEETPTR" +>xsltStylesheetPtr style, xmlNodePtr

Description

Details

xmlXPathCompExprPtr comp); comp, + xmlNsPtr *nsList, + int nsNr);ctxt: :comp: :nsList : the namespaces in scope +int nsNr: the number of namespaces in scopensNr : Returns

ctxt: :node: :parent: :

ctxt: :node: :name: :ns: :

xmlChar* xsltEvalStaticAttrValueTemplate (xsltTransformContextPtr ctxt, +HREF="libxslt-xsltinternals.html#XSLTSTYLESHEETPTR" +>xsltStylesheetPtr style, xmlNodePtrctxtstyle: : the XSLT transformation context the XSLT stylesheetnode: :name: :ns: :found: :

ctxt: :comp: :

ctxt: :node: :

ctxt: :target: :cur: :

ctxt: :target: :attr: :

ctxt: :attr: :

Name

Synopsis

Description

Details

style: :doc: :params: :

ctxt: :node: :list: :real: :

ctxt: :node: :inst: :comp: :

Process the xslt sort node on the source node

function attached to xslt:sort nodes, but this should not be +called directly

ctxt: :node: :inst: :comp: :

ctxt: :node: :inst: :comp: :

ctxt: :node: :inst: :comp: :

ctxt: :node: :inst: :comp: :

ctxt: :node: :inst: :comp: :

ctxt: :node: :inst: :comp: :

ctxt: :node: :inst: :comp: :

ctxt: :node: :inst: :comp: :

ctxt: :node: :inst: :comp: :

ctxt: :node: :inst: :comp: :

ctxt: :node: :inst: :comp: :

ctxt: :node: :inst: :comp: :

ctxt: :node: :inst: :comp: :

ctxt: :node: :inst: :comp: :

ctxt: :node: :inst: :comp: :

ctxt: :node: :inst: :comp: :

Name

Synopsis

xmlChar *ns_uri); -int xsltRegisterVariable (xsltTransformContextPtr ctxt, - const xmlChar *name, - const xmlChar *ns_uri, - const xmlChar *select, - xmlNodePtr tree, - int param); xmlXPathObjectPtr

Description

Details

ctxt: :

ctxt: :

ctxt: :params: :

ctxt: :

ctxt: :

style: :cur: :

style: :cur: :

ctxt: :cur: :

ctxt: :cur: :

ctxt: :cur: :

ctxt: :elems: :

ctxt: :

ctxt: :name: :ns_uri: :

xsltRegisterVariable ()

int         xsltRegisterVariable            (xsltTransformContextPtr ctxt,
-                                             const xmlChar *name,
-                                             const xmlChar *ns_uri,
-                                             const xmlChar *select,
-                                             xmlNodePtr tree,
-                                             int param);

Computes and register a new variable value.

ctxt: the XSLT transformation context
name: the variable name
ns_uri: the variable namespace URI
select: the expression which need to be evaluated to generate a value
tree: the tree if select is NULL
param: this is a parameter actually
Returns :0 in case of success, -1 in case of error


ctxt: :name: :ns_uri: :

Name

Synopsis

+#define XSLT_MAX_SORT enum xsltElemxsltDecimalFormat; struct xsltStylesheet; -typedef xsltStylesheetPtr; -struct xsltTransformContext; @@ -219,6 +215,14 @@ enum xsltStyleType; +struct xsltStylesheet; +typedef xsltStylesheetPtr; enum xsltOutputType

Description

Details

XSLT_MAX_SORT

#define XSLT_MAX_SORT 5









struct xsltTransformContext

struct xsltTransformContext {
+    xsltStylesheetPtr style;		/* the stylesheet used */
+    xsltOutputType type;		/* the type of output */
+
+    xsltTemplatePtr  templ;		/* the current template */
+    int              templNr;		/* Nb of templates in the stack */
+    int              templMax;		/* Size of the templtes stack */
+    xsltTemplatePtr *templTab;		/* the template stack */
+
+    xsltStackElemPtr  vars;		/* the current variable list */
+    int               varsNr;		/* Nb of variable list in the stack */
+    int               varsMax;		/* Size of the variable list stack */
+    xsltStackElemPtr *varsTab;		/* the variable list stack */
+
+    /*
+     * Extensions
+     */
+    xmlHashTablePtr   extFunctions;	/* the extension functions */
+    xmlHashTablePtr   extElements;	/* the extension elements */
+
+    const xmlChar *mode;		/* the current mode */
+    const xmlChar *modeURI;		/* the current mode URI */
+
+    xsltDocumentPtr docList;		/* the document list */
+
+    xsltDocumentPtr document;		/* the current document */
+    xmlNodePtr node;			/* the current node being processed */
+    xmlNodeSetPtr nodeList;		/* the current node list */
+    /* xmlNodePtr current;			the node */
+
+    xmlDocPtr output;			/* the resulting document */
+    xmlNodePtr insert;			/* the insertion node */
+
+    xmlXPathContextPtr xpathCtxt;	/* the XPath context */
+    xsltTransformState state;		/* the current state */
+};


xsltTransformContextPtr

typedef xsltTransformContext *xsltTransformContextPtr;


struct xsltStylePreComp

struct xsltStylePreComp {
+    struct _xsltStylePreComp *next;/* chained list */
+    xsltStyleType type;		/* type of the element */
+    xsltTransformFunction func; /* handling function */
+    xmlNodePtr inst;		/* the instruction */
+
+    /*
+     * Pre computed values
+     */
+
+    xmlChar *stype;             /* sort */
+    int      has_stype;		/* sort */
+    int      number;		/* sort */
+    xmlChar *order;             /* sort */
+    int      has_order;		/* sort */
+    int      descending;	/* sort */
+
+    xmlChar *use;		/* copy, element */
+    int      has_use;		/* copy, element */
+
+    int      noescape;		/* text */
+
+    xmlChar *name;		/* element, attribute, pi */
+    int      has_name;		/* element, attribute, pi */
+    xmlChar *ns;		/* element */
+    int      has_ns;		/* element */
+
+    xmlChar *mode;		/* apply-templates */
+    xmlChar *modeURI;		/* apply-templates */
+
+    xmlChar *test;		/* if */
+
+    xsltTemplatePtr templ;	/* call-template */
+
+    xmlChar *select;		/* sort, copy-of, value-of, apply-templates */
+
+    int      ver11;		/* document */
+    xmlChar *filename;		/* document URL */
+    int      has_filename;	/* document */
+
+    xsltNumberData numdata;	/* number */
+
+    xmlXPathCompExprPtr comp;	/* a precompiled XPath expression */
+    xmlNsPtr *nsList;		/* the namespaces in scope */
+    int nsNr;			/* the number of namespaces in scope */
+};


xsltStylePreCompPtr

typedef xsltStylePreComp *xsltStylePreCompPtr;


xsltTransformFunction ()

void        (*xsltTransformFunction)        (xsltTransformContextPtr ctxt,
+                                             xmlNodePtr node,
+                                             xmlNodePtr inst,
+                                             xsltStylePreCompPtr comp);

ctxt : 
node : 
inst : 
comp :


enum xsltStyleType

typedef enum {
+    XSLT_FUNC_COPY=1,
+    XSLT_FUNC_SORT,
+    XSLT_FUNC_TEXT,
+    XSLT_FUNC_ELEMENT,
+    XSLT_FUNC_ATTRIBUTE,
+    XSLT_FUNC_COMMENT,
+    XSLT_FUNC_PI,
+    XSLT_FUNC_COPYOF,
+    XSLT_FUNC_VALUEOF,
+    XSLT_FUNC_NUMBER,
+    XSLT_FUNC_APPLYIMPORTS,
+    XSLT_FUNC_CALLTEMPLATE,
+    XSLT_FUNC_APPLYTEMPLATES,
+    XSLT_FUNC_CHOOSE,
+    XSLT_FUNC_IF,
+    XSLT_FUNC_FOREACH,
+    XSLT_FUNC_DOCUMENT,
+    XSLT_FUNC_WITHPARAM,
+    XSLT_FUNC_PARAM,
+    XSLT_FUNC_VARIABLE,
+    XSLT_FUNC_WHEN
+} xsltStyleType;




struct xsltTransformContext

struct xsltTransformContext {
-    xsltStylesheetPtr style;		/* the stylesheet used */
-    xsltOutputType type;		/* the type of output */
-
-    xsltTemplatePtr  templ;		/* the current template */
-    int              templNr;		/* Nb of templates in the stack */
-    int              templMax;		/* Size of the templtes stack */
-    xsltTemplatePtr *templTab;		/* the template stack */
-
-    xsltStackElemPtr  vars;		/* the current variable list */
-    int               varsNr;		/* Nb of variable list in the stack */
-    int               varsMax;		/* Size of the variable list stack */
-    xsltStackElemPtr *varsTab;		/* the variable list stack */
-
-    /*
-     * Precomputed blocks
-     */
-    xsltStylePreCompPtr preComps;	/* list of precomputed blocks */
-
-    /*
-     * Extensions
-     */
-    xmlHashTablePtr   extFunctions;	/* the extension functions */
-    xmlHashTablePtr   extElements;	/* the extension elements */
-
-    const xmlChar *mode;		/* the current mode */
-    const xmlChar *modeURI;		/* the current mode URI */
-
-    xsltDocumentPtr docList;		/* the document list */
-
-    xsltDocumentPtr document;		/* the current document */
-    xmlNodePtr node;			/* the current node being processed */
-    xmlNodeSetPtr nodeList;		/* the current node list */
-    /* xmlNodePtr current;			the node */
-
-    xmlDocPtr output;			/* the resulting document */
-    xmlNodePtr insert;			/* the insertion node */
-
-    xmlXPathContextPtr xpathCtxt;	/* the XPath context */
-    xsltTransformState state;		/* the current state */
-};


xsltTransformContextPtr

typedef xsltTransformContext *xsltTransformContextPtr;


struct xsltStylePreComp

struct xsltStylePreComp {
-    struct _xsltStylePreComp *next;/* chained list */
-    xsltStyleType type;		/* type of the element */
-    xsltTransformFunction func; /* handling function */
-    xmlNodePtr inst;		/* the instruction */
-
-    /*
-     * Pre computed values
-     */
-
-    xmlChar *stype;             /* sort */
-    int      has_stype;		/* sort */
-    int      number;		/* sort */
-    xmlChar *order;             /* sort */
-    int      has_order;		/* sort */
-    int      descending;	/* sort */
-
-    xmlChar *use;		/* copy, element */
-    int      has_use;		/* copy, element */
-
-    int      noescape;		/* text */
-
-    xmlChar *name;		/* element, attribute, pi */
-    int      has_name;		/* element, attribute, pi */
-    xmlChar *ns;		/* element */
-    int      has_ns;		/* element */
-
-    xmlChar *mode;		/* apply-templates */
-    xmlChar *modeURI;		/* apply-templates */
-
-    xmlChar *test;		/* if */
-
-    xsltTemplatePtr templ;	/* call-template */
-
-    xmlChar *select;		/* sort, copy-of, value-of, apply-templates */
-
-    int      ver11;		/* document */
-    xmlChar *filename;		/* document URL */
-    int      has_filename;	/* document */
-
-    xsltNumberData numdata;	/* number */
-
-    xmlXPathCompExprPtr comp;	/* a precompiled XPath expression */
-    xmlNsPtr *nsList;		/* the namespaces in scope */
-    int nsNr;			/* the number of namespaces in scope */
-};


xsltStylePreCompPtr

typedef xsltStylePreComp *xsltStylePreCompPtr;


xsltTransformFunction ()

void        (*xsltTransformFunction)        (xsltTransformContextPtr ctxt,
-                                             xmlNodePtr node,
-                                             xmlNodePtr inst,
-                                             xsltStylePreCompPtr comp);

ctxt: 
node: 
inst: 
comp:


enum xsltStyleType

typedef enum {
-    XSLT_FUNC_COPY=1,
-    XSLT_FUNC_SORT,
-    XSLT_FUNC_TEXT,
-    XSLT_FUNC_ELEMENT,
-    XSLT_FUNC_ATTRIBUTE,
-    XSLT_FUNC_COMMENT,
-    XSLT_FUNC_PI,
-    XSLT_FUNC_COPYOF,
-    XSLT_FUNC_VALUEOF,
-    XSLT_FUNC_NUMBER,
-    XSLT_FUNC_APPLYIMPORTS,
-    XSLT_FUNC_CALLTEMPLATE,
-    XSLT_FUNC_APPLYTEMPLATES,
-    XSLT_FUNC_CHOOSE,
-    XSLT_FUNC_IF,
-    XSLT_FUNC_FOREACH,
-    XSLT_FUNC_DOCUMENT
-} xsltStyleType;




#define CHECK_STOPPED if (ctxt-state == XSLT_STATE_STOPPED) return;
#define CHECK_STOPPED if (ctxt->state == XSLT_STATE_STOPPED) return;

#define CHECK_STOPPEDE if (ctxt-state == XSLT_STATE_STOPPED) goto error;
#define CHECK_STOPPEDE if (ctxt->state == XSLT_STATE_STOPPED) goto error;

#define CHECK_STOPPED0 if (ctxt-state == XSLT_STATE_STOPPED) return(0);
#define CHECK_STOPPED0 if (ctxt->state == XSLT_STATE_STOPPED) return(0);


filename: :

sheet: :

str: :

elem: :

sheet: :name: :

ret: :doc: :

style: :cur: :

doc: :

ctxt: :data: :node: :

self: :format: :number: :result: :

Name

Synopsis

xmlNodeSetPtr list); void xsltSortFunction (xmlNodeSetPtr list, +HREF="libxslt-xsltutils.html#XSLTDOSORTFUNCTION" +>xsltDoSortFunction (xsltTransformContextPtr ctxt, xmlXPathObjectPtr *results, - int descending, - int number); +HREF="XMLNODEPTR" +>xmlNodePtr *sorts, + int nbsorts); int xsltSaveResultTo

Description

Details

name: :

name: :prefix: :

ctxt: :nargs: :



n: :

n: :val: :





ctxt: :node: :inst: :

ctx: :handler: :

ctx: :handler: :

list: :

xsltSortFunction ()

xsltDoSortFunction ()

void        xsltSortFunction                (xmlNodeSetPtr list,
+>void        xsltDoSortFunction              (xsltTransformContextPtr ctxt,
                                              xmlXPathObjectPtr *results,
-                                             int descending,
-                                             int number);
xmlNodePtr *sorts, + int nbsorts);

reorder the current node list list accordingly to the values -present in the array of results results

reorder the current node list accordingly to the set of sorting +requirement provided by the arry of nodes.

listctxt: : the node set a XSLT process contextresultssorts: : the results array of sort nodesdescendingnbsorts: : direction of ordernumber: the type of the result the number of sorts in the array


buf: :result: :style: :

URI: :result: :style: :compression: :

file: :result: :style: :

fd: :result: :style: :Changelog file for a really accurate description

+

0.9.0: May 3 2001

+
    +
  • lot of various bugfixes, extended the regression suite
  • +
  • xsltproc shoudl work with multiple params
  • +
  • added an option to use xsltproc with HTML input
  • +
  • improved the stylesheet compilation, processing of complex stylesheets + should be faster
  • +
  • using the same stylesheet for concurent processing on multithreaded + programs should work now
  • +
  • fixed another batch of namespace handling problems
  • +
  • Implemented multiple level of sorting
  • +
+

0.8.0: Apr 22 2001

  • fixed ansidecl.h problem
  • diff --git a/libxslt.spec.in b/libxslt.spec.in index e034e982..158fa0a7 100644 --- a/libxslt.spec.in +++ b/libxslt.spec.in @@ -10,7 +10,7 @@ Copyright: LGPL Group: Development/Libraries Source: ftp://xmlsoft.org/XSLT/libxslt-%{ver}.tar.gz BuildRoot: /var/tmp/libxslt-%{PACKAGE_VERSION}-root -Requires: libxml2 >= 2.3.3 +Requires: libxml2 >= 2.3.8 URL: http://xmlsoft.org/XSLT/ Docdir: %{prefix}/doc @@ -18,19 +18,19 @@ Docdir: %{prefix}/doc %description This C library allows to transform XML files into other XML files (or HTML, text, ...) using the standard XSLT stylesheet transformation -mechanism. To use it you need to have a version of libxml2 >= 2.3.3 +mechanism. To use it you need to have a version of libxml2 >= 2.3.8 installed. %package devel Summary: Libraries, includes, etc. to develop XML and HTML applications Group: Development/Libraries Requires: libxslt = %{version} -Requires: libxml2-devel >= 2.3.2 +Requires: libxml2-devel >= 2.3.8 %description devel This C library allows to transform XML files into other XML files (or HTML, text, ...) using the standard XSLT stylesheet transformation -mechanism. To use it you need to have a version of libxml2 >= 2.3.3 +mechanism. To use it you need to have a version of libxml2 >= 2.3.8 installed. %changelog