From ed85c17b6a1555949f107665a8a1fd6492f1d9ba Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Fri, 26 Jan 2001 21:32:59 +0000 Subject: [PATCH] Too tired to do some code, prepared documentation: - Makefile.am configure.in doc/Makefile.am: added a doc subdir and the rules to generates the makefiles. - doc/libxslt.sgml doc/xslt.html: very first version of the manual - doc/html/*.html : autogenerated documentation - libxslt/xsltInternals.h: fixed a typedef wich was breaking gtk-doc Daniel --- ChangeLog | 8 + Makefile.am | 3 +- configure.in | 1 + doc/Makefile.am | 55 + doc/html/book1.html | 229 ++++ doc/html/libxslt-functions.html | 1175 ++++++++++++++++ doc/html/libxslt-lib.html | 256 ++++ doc/html/libxslt-notes.html | 212 +++ doc/html/libxslt-pattern.html | 716 ++++++++++ doc/html/libxslt-templates.html | 1194 +++++++++++++++++ doc/html/libxslt-transform.html | 511 +++++++ doc/html/libxslt-xslt.html | 394 ++++++ doc/html/libxslt-xsltinternals.html | 1016 ++++++++++++++ doc/html/libxslt-xsltutils.html | 1925 +++++++++++++++++++++++++++ doc/libxslt.sgml | 76 ++ doc/xslt.html | 174 +++ libxslt/xsltInternals.h | 2 +- 17 files changed, 7945 insertions(+), 2 deletions(-) create mode 100644 doc/Makefile.am create mode 100644 doc/html/book1.html create mode 100644 doc/html/libxslt-functions.html create mode 100644 doc/html/libxslt-lib.html create mode 100644 doc/html/libxslt-notes.html create mode 100644 doc/html/libxslt-pattern.html create mode 100644 doc/html/libxslt-templates.html create mode 100644 doc/html/libxslt-transform.html create mode 100644 doc/html/libxslt-xslt.html create mode 100644 doc/html/libxslt-xsltinternals.html create mode 100644 doc/html/libxslt-xsltutils.html create mode 100644 doc/libxslt.sgml create mode 100644 doc/xslt.html diff --git a/ChangeLog b/ChangeLog index 29ed811f..e543a34c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Fri Jan 26 22:29:34 CET 2001 Daniel Veillard + + * Makefile.am configure.in doc/Makefile.am: added a doc subdir + and the rules to generates the makefiles. + * doc/libxslt.sgml doc/xslt.html: very first version of the manual + * doc/html/*.html : autogenerated documentation + * libxslt/xsltInternals.h: fixed a typedef wich was breaking gtk-doc + Fri Jan 26 21:48:25 CET 2001 Daniel Veillard * libxslt/functions.c: xsltGenerateIdFunction() small patch diff --git a/Makefile.am b/Makefile.am index e2275472..f5a2511a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,7 @@ SUBDIRS = \ libxslt \ - tests + tests \ + doc confexecdir=$(libdir) confexec_DATA = xsltConf.sh diff --git a/configure.in b/configure.in index 66968916..0ba67a1c 100644 --- a/configure.in +++ b/configure.in @@ -146,6 +146,7 @@ libxslt/xsltconfig.h tests/Makefile tests/REC1/Makefile tests/REC2/Makefile +doc/Makefile xslt-config libxslt.spec ]) diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 00000000..11b92ee3 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,55 @@ +## Process this file with automake to produce Makefile.in + +# The name of the module. +DOC_MODULE=libxslt-$(VERSION) + +# The top-level SGML file. +DOC_MAIN_SGML_FILE=libxslt.sgml + +# The directory containing the source code (if it contains documentation). +DOC_SOURCE_DIR=.. + +HTML_DIR=$(prefix)/doc + +TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)/html + +# htmldir = $(prefix)/html +# html_DATA = gnome-dev-info.html + +scan: + gtkdoc-scan --module=libxslt --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="acconfig.h config.h" + +templates: scan + gtkdoc-mktmpl --module=libxslt + +sgml: + gtkdoc-mkdb --module=libxslt --source-dir=$(DOC_SOURCE_DIR) + +html: + if ! test -d html ; then mkdir html ; fi + -cd html && gtkdoc-mkhtml libxslt ../$(DOC_MAIN_SGML_FILE) + +clean-local: + rm -f *~ *.bak *.hierarchy *.signals *-unused.txt + +maintainer-clean-local: clean + rm -rf sgml html libxslt-decl-list.txt libxslt-decl.txt + +libxslt-decl-list.txt : templates + +libxslt-sections.txt : scan + cp libxslt-decl-list.txt libxslt-sections.txt + +rebuild: libxslt-sections.txt templates sgml html + +install-data-local: + $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR) + -@INSTALL@ -m 0644 $(srcdir)/xml.html $(DESTDIR)$(TARGET_DIR) + -@INSTALL@ -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(TARGET_DIR) + -@INSTALL@ -m 0644 $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) + -(cd $(DESTDIR); gtkdoc-fixxref --module=libxslt --html-dir=$(HTML_DIR)) + +dist-hook: + (cd $(srcdir) ; tar cvf - *.html *.gif html/*.html html/*.sgml) | (cd $(distdir); tar xf -) + +.PHONY : html sgml templates scan diff --git a/doc/html/book1.html b/doc/html/book1.html new file mode 100644 index 00000000..19001f74 --- /dev/null +++ b/doc/html/book1.html @@ -0,0 +1,229 @@ +Gnome XSLT Library Reference Manual

Gnome XSLT Library Reference Manual

Daniel Veillard

    Daniel.Veillard@imag.fr
+   

Copyright © 2001 by Daniel Veillard

This manual documents the interfaces of the libxslt + library and has some short notes to help get you up to speed + with using the library.

Permission is granted to make and distribute verbatim + copies of this manual provided the copyright notice and this + permission notice are preserved on all copies.

Permission is granted to copy and distribute modified + versions of this manual under the conditions for verbatim + copying, provided also that the entire resulting derived work is + distributed under the terms of a permission notice identical to + this one.

Permission is granted to copy and distribute translations + of this manual into another language, under the above conditions + for modified versions.

Table of Contents
Libxml Programming Notes
Libxslt Library Reference
xslt
functions
pattern
templates
transform
xsltInternals
xsltutils


   Next Page >>>
 Libxml Programming Notes
\ No newline at end of file diff --git a/doc/html/libxslt-functions.html b/doc/html/libxslt-functions.html new file mode 100644 index 00000000..22a2752a --- /dev/null +++ b/doc/html/libxslt-functions.html @@ -0,0 +1,1175 @@ +functions
Gnome XSLT Library Reference Manual
<<< Previous PageHomeUpNext Page >>>

functions

Name

functions -- 

Synopsis


+
+void        xsltDocumentFunction            (xmlXPathParserContextPtr ctxt,
+                                             int nargs);
+void        xsltKeyFunction                 (xmlXPathParserContextPtr ctxt,
+                                             int nargs);
+void        xsltUnparsedEntityURIFunction   (xmlXPathParserContextPtr ctxt,
+                                             int nargs);
+void        xsltFormatNumberFunction        (xmlXPathParserContextPtr ctxt,
+                                             int nargs);
+void        xsltGenerateIdFunction          (xmlXPathParserContextPtr ctxt,
+                                             int nargs);
+void        xsltSystemPropertyFunction      (xmlXPathParserContextPtr ctxt,
+                                             int nargs);
+void        xsltElementAvailableFunction    (xmlXPathParserContextPtr ctxt,
+                                             int nargs);
+void        xsltFunctionAvailableFunction   (xmlXPathParserContextPtr ctxt,
+                                             int nargs);
+void        xsltXXXFunction                 (xmlXPathParserContextPtr ctxt,
+                                             int nargs);
+void        xsltRegisterAllFunctions        (xmlXPathContextPtr ctxt);

Description

Details

xsltDocumentFunction ()

void        xsltDocumentFunction            (xmlXPathParserContextPtr ctxt,
+                                             int nargs);

Implement the document() XSLT function +node-set document(object, node-set?)

ctxt : the XPath Parser context
nargs : the number of arguments


xsltKeyFunction ()

void        xsltKeyFunction                 (xmlXPathParserContextPtr ctxt,
+                                             int nargs);

Implement the key() XSLT function +node-set key(string, object)

ctxt : the XPath Parser context
nargs : the number of arguments


xsltUnparsedEntityURIFunction ()

void        xsltUnparsedEntityURIFunction   (xmlXPathParserContextPtr ctxt,
+                                             int nargs);

Implement the unparsed-entity-uri() XSLT function +string unparsed-entity-uri(string)

ctxt : the XPath Parser context
nargs : the number of arguments


xsltFormatNumberFunction ()

void        xsltFormatNumberFunction        (xmlXPathParserContextPtr ctxt,
+                                             int nargs);

Implement the format-number() XSLT function +string format-number(number, string, string?)

ctxt : the XPath Parser context
nargs : the number of arguments


xsltGenerateIdFunction ()

void        xsltGenerateIdFunction          (xmlXPathParserContextPtr ctxt,
+                                             int nargs);

Implement the generate-id() XSLT function +string generate-id(node-set?)

ctxt : the XPath Parser context
nargs : the number of arguments


xsltSystemPropertyFunction ()

void        xsltSystemPropertyFunction      (xmlXPathParserContextPtr ctxt,
+                                             int nargs);

Implement the system-property() XSLT function +object system-property(string)

ctxt : the XPath Parser context
nargs : the number of arguments


xsltElementAvailableFunction ()

void        xsltElementAvailableFunction    (xmlXPathParserContextPtr ctxt,
+                                             int nargs);

Implement the element-available() XSLT function +boolean element-available(string)

ctxt : the XPath Parser context
nargs : the number of arguments


xsltFunctionAvailableFunction ()

void        xsltFunctionAvailableFunction   (xmlXPathParserContextPtr ctxt,
+                                             int nargs);

Implement the function-available() XSLT function +boolean function-available(string)

ctxt : the XPath Parser context
nargs : the number of arguments


xsltXXXFunction ()

void        xsltXXXFunction                 (xmlXPathParserContextPtr ctxt,
+                                             int nargs);

ctxt : 
nargs :


xsltRegisterAllFunctions ()

void        xsltRegisterAllFunctions        (xmlXPathContextPtr ctxt);

Registers all default XSLT functions in this context

ctxt : the XPath context



<<< Previous PageHomeUpNext Page >>>
xsltpattern
\ No newline at end of file diff --git a/doc/html/libxslt-lib.html b/doc/html/libxslt-lib.html new file mode 100644 index 00000000..d683d605 --- /dev/null +++ b/doc/html/libxslt-lib.html @@ -0,0 +1,256 @@ +Libxslt Library Reference
Gnome XSLT Library Reference Manual
<<< Previous PageHome Next Page >>>

Libxslt Library Reference

Table of Contents
xslt
functions
pattern
templates
transform
xsltInternals
xsltutils

This section contains the API reference for libxslt. All + the public interfaces are documented here. This reference guide is + build by extracting comments from the code sources.



<<< Previous PageHome Next Page >>>
Libxml Programming Notesxslt
\ No newline at end of file diff --git a/doc/html/libxslt-notes.html b/doc/html/libxslt-notes.html new file mode 100644 index 00000000..0eac35ef --- /dev/null +++ b/doc/html/libxslt-notes.html @@ -0,0 +1,212 @@ +Libxml Programming Notes
Gnome XSLT Library Reference Manual
<<< Previous PageHome Next Page >>>

Libxml Programming Notes

Libxml is an XSLT toolkit library, it allows to transform + XML documents. It uses the XML parser, tree and XPath functionnalities + of libxml2



<<< Previous PageHome Next Page >>>
Gnome XSLT Library Reference ManualLibxslt Library Reference
\ No newline at end of file diff --git a/doc/html/libxslt-pattern.html b/doc/html/libxslt-pattern.html new file mode 100644 index 00000000..78a070f5 --- /dev/null +++ b/doc/html/libxslt-pattern.html @@ -0,0 +1,716 @@ +pattern
Gnome XSLT Library Reference Manual
<<< Previous PageHomeUpNext Page >>>

pattern

Name

pattern -- 

Synopsis


+
+int         xsltAddTemplate                 (xsltStylesheetPtr style,
+                                             xsltTemplatePtr cur);
+xsltTemplatePtr xsltGetTemplate             (xsltStylesheetPtr style,
+                                             xmlNodePtr node);
+void        xsltFreeTemplateHashes          (xsltStylesheetPtr style);
+xsltTemplatePtr xsltFindTemplate            (xsltStylesheetPtr style,
+                                             const xmlChar *name,
+                                             const xmlChar *nameURI);

Description

Details

xsltAddTemplate ()

int         xsltAddTemplate                 (xsltStylesheetPtr style,
+                                             xsltTemplatePtr cur);

Register the XSLT pattern associated to cur

style : an XSLT stylesheet
cur : an XSLT template
Returns :-1 in case of error, 0 otherwise


xsltGetTemplate ()

xsltTemplatePtr xsltGetTemplate             (xsltStylesheetPtr style,
+                                             xmlNodePtr node);

Finds the template applying to this node

style : an XSLT stylesheet
node : an XML Node
Returns :the xsltTemplatePtr or NULL if not found


xsltFreeTemplateHashes ()

void        xsltFreeTemplateHashes          (xsltStylesheetPtr style);

Free up the memory used by xsltAddTemplate/xsltGetTemplate mechanism

style : an XSLT stylesheet


xsltFindTemplate ()

xsltTemplatePtr xsltFindTemplate            (xsltStylesheetPtr style,
+                                             const xmlChar *name,
+                                             const xmlChar *nameURI);

Finds the named template.

style : an XSLT stylesheet
name : the template name
nameURI : the template name URI
Returns :the xsltTemplatePtr or NULL if not found



<<< Previous PageHomeUpNext Page >>>
functionstemplates
\ No newline at end of file diff --git a/doc/html/libxslt-templates.html b/doc/html/libxslt-templates.html new file mode 100644 index 00000000..25399511 --- /dev/null +++ b/doc/html/libxslt-templates.html @@ -0,0 +1,1194 @@ +templates
Gnome XSLT Library Reference Manual
<<< Previous PageHomeUpNext Page >>>

templates

Name

templates -- 

Synopsis


+
+xmlChar*    xsltEvalTemplateString          (xsltTransformContextPtr ctxt,
+                                             xmlNodePtr node,
+                                             xmlNodePtr parent);
+xmlChar*    xsltEvalAttrValueTemplate       (xsltTransformContextPtr ctxt,
+                                             xmlNodePtr node,
+                                             const xmlChar *name);
+xmlChar*    xsltEvalXPathString             (xsltTransformContextPtr ctxt,
+                                             const xmlChar *expr);
+xmlNodePtr* xsltTemplateProcess             (xsltTransformContextPtr ctxt,
+                                             xmlNodePtr node);
+xmlAttrPtr  xsltAttrListTemplateProcess     (xsltTransformContextPtr ctxt,
+                                             xmlNodePtr target,
+                                             xmlAttrPtr cur);
+xmlAttrPtr  xsltAttrTemplateProcess         (xsltTransformContextPtr ctxt,
+                                             xmlNodePtr target,
+                                             xmlAttrPtr attr);
+xmlChar*    xsltAttrTemplateValueProcess    (xsltTransformContextPtr ctxt,
+                                             const xmlChar *attr);

Description

Details

xsltEvalTemplateString ()

xmlChar*    xsltEvalTemplateString          (xsltTransformContextPtr ctxt,
+                                             xmlNodePtr node,
+                                             xmlNodePtr parent);

Evaluate a template string value, i.e. the parent list is interpreter +as template content and the resulting tree string value is returned +This is needed for example by xsl:comment and xsl:processing-instruction

ctxt : the XSLT transformation context
node : the stylesheet node
parent : the content parent
Returns :the computed string value or NULL, must be deallocated by the +caller.


xsltEvalAttrValueTemplate ()

xmlChar*    xsltEvalAttrValueTemplate       (xsltTransformContextPtr ctxt,
+                                             xmlNodePtr node,
+                                             const xmlChar *name);

Evaluate a attribute value template, i.e. the attribute value can +contain expressions contained in curly braces ({}) and those are +substituted by they computed value.

ctxt : the XSLT transformation context
node : the stylesheet node
name : the attribute QName
Returns :the computed string value or NULL, must be deallocated by the +caller.


xsltEvalXPathString ()

xmlChar*    xsltEvalXPathString             (xsltTransformContextPtr ctxt,
+                                             const xmlChar *expr);

Process the expression using XPath and get a string

ctxt : the XSLT transformation context
expr : 
Returns :the computed string value or NULL, must be deallocated by the +caller.


xsltTemplateProcess ()

xmlNodePtr* xsltTemplateProcess             (xsltTransformContextPtr ctxt,
+                                             xmlNodePtr node);

Process the given node and return the new string value.

ctxt : the XSLT transformation context
node : the attribute template node
Returns :the computed tree replacement


xsltAttrListTemplateProcess ()

xmlAttrPtr  xsltAttrListTemplateProcess     (xsltTransformContextPtr ctxt,
+                                             xmlNodePtr target,
+                                             xmlAttrPtr cur);

Do a copy of an attribute list with attribute template processing

ctxt : the XSLT transformation context
target : the element where the attributes will be grafted
cur : the first attribute
Returns : a new xmlAttrPtr, or NULL in case of error.


xsltAttrTemplateProcess ()

xmlAttrPtr  xsltAttrTemplateProcess         (xsltTransformContextPtr ctxt,
+                                             xmlNodePtr target,
+                                             xmlAttrPtr attr);

Process the given attribute and return the new processed copy.

ctxt : the XSLT transformation context
target : the result node
attr : 
Returns :the attribute replacement.


xsltAttrTemplateValueProcess ()

xmlChar*    xsltAttrTemplateValueProcess    (xsltTransformContextPtr ctxt,
+                                             const xmlChar *attr);

Process the given node and return the new string value.

ctxt : the XSLT transformation context
attr : 
Returns :the computed string value or NULL, must be deallocated by the +caller.



<<< Previous PageHomeUpNext Page >>>
patterntransform
\ No newline at end of file diff --git a/doc/html/libxslt-transform.html b/doc/html/libxslt-transform.html new file mode 100644 index 00000000..4786a973 --- /dev/null +++ b/doc/html/libxslt-transform.html @@ -0,0 +1,511 @@ +transform
Gnome XSLT Library Reference Manual
<<< Previous PageHomeUpNext Page >>>

transform

Name

transform -- 

Synopsis


+
+xmlDocPtr   xsltApplyStylesheet             (xsltStylesheetPtr style,
+                                             xmlDocPtr doc);
+void        xsltApplyOneTemplate            (xsltTransformContextPtr ctxt,
+                                             xmlNodePtr node,
+                                             xmlNodePtr list);

Description

Details

xsltApplyStylesheet ()

xmlDocPtr   xsltApplyStylesheet             (xsltStylesheetPtr style,
+                                             xmlDocPtr doc);

Apply the stylesheet to the document +NOTE: This may lead to a non-wellformed output XML wise !

style : a parsed XSLT stylesheet
doc : a parsed XML document
Returns :the result document or NULL in case of error


xsltApplyOneTemplate ()

void        xsltApplyOneTemplate            (xsltTransformContextPtr ctxt,
+                                             xmlNodePtr node,
+                                             xmlNodePtr list);

Process the apply-templates node on the source node

ctxt : a XSLT process context
node : the node in the source tree.
list : the template replacement nodelist



<<< Previous PageHomeUpNext Page >>>
templatesxsltInternals
\ No newline at end of file diff --git a/doc/html/libxslt-xslt.html b/doc/html/libxslt-xslt.html new file mode 100644 index 00000000..e1ad99a0 --- /dev/null +++ b/doc/html/libxslt-xslt.html @@ -0,0 +1,394 @@ +xslt
Gnome XSLT Library Reference Manual
<<< Previous PageHomeUpNext Page >>>

xslt

Name

xslt -- 

Synopsis


+
+#define     XSLT_DEFAULT_VERSION
+#define     XSLT_DEFAULT_VENDOR
+#define     XSLT_DEFAULT_URL
+#define     XSLT_NAMESPACE

Description

Details

XSLT_DEFAULT_VERSION

#define XSLT_DEFAULT_VERSION     "1.0"


XSLT_DEFAULT_VENDOR

#define XSLT_DEFAULT_VENDOR      "libxslt"


XSLT_DEFAULT_URL

#define XSLT_DEFAULT_URL         "http://xmlsoft.org/XSLT/"


XSLT_NAMESPACE

#define XSLT_NAMESPACE ((xmlChar *) "http://www.w3.org/1999/XSL/Transform")



<<< Previous PageHomeUpNext Page >>>
Libxslt Library Referencefunctions
\ No newline at end of file diff --git a/doc/html/libxslt-xsltinternals.html b/doc/html/libxslt-xsltinternals.html new file mode 100644 index 00000000..e0ee21c9 --- /dev/null +++ b/doc/html/libxslt-xsltinternals.html @@ -0,0 +1,1016 @@ +xsltInternals
Gnome XSLT Library Reference Manual
<<< Previous PageHomeUpNext Page >>>

xsltInternals

Name

xsltInternals -- 

Synopsis


+
+enum        xsltElem;
+struct      xsltStackElem;
+typedef     xsltStackElemPtr;
+#define     XSLT_PAT_NO_PRIORITY
+struct      xsltTemplate;
+typedef     xsltTemplatePtr;
+struct      xsltStylesheet;
+typedef     xsltStylesheetPtr;
+enum        xsltOutputType;
+struct      xsltTransformContext;
+typedef     xsltTransformContextPtr;
+xsltStylesheetPtr xsltParseStylesheetFile   (const xmlChar *filename);
+void        xsltFreeStylesheet              (xsltStylesheetPtr sheet);
+int         xsltIsBlank                     (xmlChar *str);
+void        xsltFreeStackElemList           (xsltStackElemPtr elem);

Description

Details

enum xsltElem

typedef enum {
+    XSLT_ELEM_VARIABLE=1,
+    XSLT_ELEM_PARAM
+} xsltElem;


struct xsltStackElem

struct xsltStackElem {
+    struct _xsltStackElem *next;/* chained list */
+    xsltElem type;	/* type of the element */
+    int computed;	/* was the evaluation done */
+    xmlChar *name;	/* the local part of the name QName */
+    xmlChar *nameURI;	/* the URI part of the name QName */
+    xmlChar *select;	/* the eval string */
+    xmlNodePtr tree;	/* the tree if no eval string */
+    xmlXPathObjectPtr value; /* The value if computed */
+};


xsltStackElemPtr

typedef xsltStackElem *xsltStackElemPtr;


XSLT_PAT_NO_PRIORITY

#define XSLT_PAT_NO_PRIORITY -12345789


struct xsltTemplate

struct xsltTemplate {
+    struct _xsltTemplate *next;/* chained list sorted by priority */
+    xmlChar *match;	/* the matching string */
+    int priority;	/* as given from the stylesheet, not computed */
+    xmlChar *name;	/* the local part of the name QName */
+    xmlChar *nameURI;	/* the URI part of the name QName */
+    xmlChar *mode;	/* the local part of the mode QName */
+    xmlChar *modeURI;	/* the URI part of the mode QName */
+    xmlNodePtr content;	/* the template replacement value */
+};


xsltTemplatePtr

typedef xsltTemplate *xsltTemplatePtr;


struct xsltStylesheet

struct xsltStylesheet {
+    /*
+     * The stylesheet import relation is kept as a tree
+     */
+    struct _xsltStylesheet *parent;
+    struct _xsltStylesheet *imports;
+
+    /*
+     * General data on the style sheet document
+     */
+    xmlDocPtr doc;		/* the parsed XML stylesheet */
+    xmlHashTablePtr stripSpaces;/* the hash table of the strip-space
+				   preserve space and cdata-section elements */
+
+    /*
+     * Global variable or parameters
+     */
+    xsltStackElemPtr variables; /* linked list of param and variables */
+
+    /*
+     * Template descriptions
+     */
+    xsltTemplatePtr templates;	/* the ordered list of templates */
+    void *templatesHash;	/* hash table or wherever compiled templates
+				   informations are stored */
+    void *rootMatch;		/* template based on / */
+    void *elemMatch;		/* template based on * */
+    void *attrMatch;		/* template based on @* */
+    void *parentMatch;		/* template based on .. */
+    void *textMatch;		/* template based on text() */
+    void *piMatch;		/* template based on processing-instruction() */
+    void *commentMatch;		/* template based on comment() */
+    
+    /*
+     * Output related stuff.
+     */
+    xmlChar *method;		/* the output method */
+    xmlChar *methodURI;		/* associated namespace if any */
+    xmlChar *version;		/* version string */
+    xmlChar *encoding;		/* encoding string */
+    int omitXmlDeclaration;     /* omit-xml-declaration = "yes" | "no" */
+    int standalone;             /* standalone = "yes" | "no" */
+    xmlChar *doctypePublic;     /* doctype-public string */
+    xmlChar *doctypeSystem;     /* doctype-system string */
+    int indent;			/* should output being indented */
+    xmlChar *mediaType;		/* media-type string */
+};


xsltStylesheetPtr

typedef xsltStylesheet *xsltStylesheetPtr;


enum xsltOutputType

typedef enum {
+    XSLT_OUTPUT_XML = 0,
+    XSLT_OUTPUT_HTML,
+    XSLT_OUTPUT_TEXT
+} xsltOutputType;


struct xsltTransformContext

struct xsltTransformContext {
+    xsltStylesheetPtr style;		/* the stylesheet used */
+    xsltOutputType type;		/* the type of output */
+
+    xmlDocPtr doc;			/* the current doc */
+    xmlNodePtr node;			/* the current node */
+    xmlNodeSetPtr nodeList;		/* the current node list */
+
+    xmlDocPtr output;			/* the resulting document */
+    xmlNodePtr insert;			/* the insertion node */
+
+    xmlXPathContextPtr xpathCtxt;	/* the XPath context */
+    void *variablesHash;		/* hash table or wherever variables
+				   	   informations are stored */
+    xmlDocPtr extraDocs;		/* extra docs parsed by document() */
+};


xsltTransformContextPtr

typedef xsltTransformContext *xsltTransformContextPtr;


xsltParseStylesheetFile ()

xsltStylesheetPtr xsltParseStylesheetFile   (const xmlChar *filename);

Load and parse an XSLT stylesheet

filename : the filename/URL to the stylesheet
Returns :a new XSLT stylesheet structure.


xsltFreeStylesheet ()

void        xsltFreeStylesheet              (xsltStylesheetPtr sheet);

Free up the memory allocated by sheet

sheet : an XSLT stylesheet


xsltIsBlank ()

int         xsltIsBlank                     (xmlChar *str);

str : a string
Returns :1 if the string is NULL or made of blanks chars, 0 otherwise


xsltFreeStackElemList ()

void        xsltFreeStackElemList           (xsltStackElemPtr elem);

Free up the memory allocated by elem

elem : an XSLT stack element



<<< Previous PageHomeUpNext Page >>>
transformxsltutils
\ No newline at end of file diff --git a/doc/html/libxslt-xsltutils.html b/doc/html/libxslt-xsltutils.html new file mode 100644 index 00000000..446c4ad3 --- /dev/null +++ b/doc/html/libxslt-xsltutils.html @@ -0,0 +1,1925 @@ +xsltutils
Gnome XSLT Library Reference Manual
<<< Previous PageHomeUp 

xsltutils

Name

xsltutils -- 

Synopsis


+
+xmlChar*    xmlSplitQName2                  (const xmlChar *name,
+                                             xmlChar **prefix);
+void        xmlXPathBooleanFunction         (xmlXPathParserContextPtr ctxt,
+                                             int nargs);
+xmlAttrPtr  xmlSetNsProp                    (xmlNodePtr node,
+                                             xmlNsPtr ns,
+                                             const xmlChar *name,
+                                             const xmlChar *value);
+#define     TODO
+#define     STRANGE
+#define     IS_XSLT_ELEM                    (n)
+#define     IS_XSLT_NAME                    (n, val)
+extern      xmlGenericErrorFunc xsltGenericError;
+extern      void *xsltGenericErrorContext;
+extern      xmlGenericErrorFunc xsltGenericDebug;
+extern      void *xsltGenericDebugContext;
+void        xsltSetGenericErrorFunc         (void *ctx,
+                                             xmlGenericErrorFunc handler);
+void        xsltSetGenericDebugFunc         (void *ctx,
+                                             xmlGenericErrorFunc handler);
+void        xsltSortFunction                (xmlNodeSetPtr list,
+                                             xmlXPathObjectPtr *results,
+                                             int descending,
+                                             int number);
+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);

Description

Details

xmlSplitQName2 ()

xmlChar*    xmlSplitQName2                  (const xmlChar *name,
+                                             xmlChar **prefix);

name : 
prefix : 
Returns :


xmlXPathBooleanFunction ()

void        xmlXPathBooleanFunction         (xmlXPathParserContextPtr ctxt,
+                                             int nargs);

ctxt : 
nargs :


xmlSetNsProp ()

xmlAttrPtr  xmlSetNsProp                    (xmlNodePtr node,
+                                             xmlNsPtr ns,
+                                             const xmlChar *name,
+                                             const xmlChar *value);

node : 
ns : 
name : 
value : 
Returns :


TODO

#define     TODO


STRANGE

#define     STRANGE


IS_XSLT_ELEM()

#define     IS_XSLT_ELEM(n)

n :


IS_XSLT_NAME()

#define     IS_XSLT_NAME(n, val)

n : 
val :


xsltGenericError

extern xmlGenericErrorFunc xsltGenericError;


xsltGenericErrorContext

extern void *xsltGenericErrorContext;


xsltGenericDebug

extern xmlGenericErrorFunc xsltGenericDebug;


xsltGenericDebugContext

extern void *xsltGenericDebugContext;


xsltSetGenericErrorFunc ()

void        xsltSetGenericErrorFunc         (void *ctx,
+                                             xmlGenericErrorFunc handler);

Function to reset the handler and the error context for out of +context error messages. +This simply means that handler will be called for subsequent +error messages while not parsing nor validating. And ctx will +be passed as first argument to handler +One can simply force messages to be emitted to another FILE * than +stderr by setting ctx to this file handle and handler to NULL.

ctx : the new error handling context
handler : the new handler function


xsltSetGenericDebugFunc ()

void        xsltSetGenericDebugFunc         (void *ctx,
+                                             xmlGenericErrorFunc handler);

Function to reset the handler and the error context for out of +context error messages. +This simply means that handler will be called for subsequent +error messages while not parsing nor validating. And ctx will +be passed as first argument to handler +One can simply force messages to be emitted to another FILE * than +stderr by setting ctx to this file handle and handler to NULL.

ctx : the new error handling context
handler : the new handler function


xsltSortFunction ()

void        xsltSortFunction                (xmlNodeSetPtr list,
+                                             xmlXPathObjectPtr *results,
+                                             int descending,
+                                             int number);

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

list : the node set
results : the results
descending : direction of order
number : the type of the result


xsltSaveResultTo ()

int         xsltSaveResultTo                (xmlOutputBufferPtr buf,
+                                             xmlDocPtr result,
+                                             xsltStylesheetPtr style);

Save the result result obtained by applying the style stylesheet +to an I/O output channel buf

buf : an output buffer
result : the result xmlDocPtr
style : the stylesheet
Returns :the number of byte written or -1 in case of failure.


xsltSaveResultToFilename ()

int         xsltSaveResultToFilename        (const char *URI,
+                                             xmlDocPtr result,
+                                             xsltStylesheetPtr style,
+                                             int compression);

Save the result result obtained by applying the style stylesheet +to a file or URL URL

URI : 
result : the result xmlDocPtr
style : the stylesheet
compression : the compression factor (0 - 9 included)
Returns :the number of byte written or -1 in case of failure.


xsltSaveResultToFile ()

int         xsltSaveResultToFile            (FILE *file,
+                                             xmlDocPtr result,
+                                             xsltStylesheetPtr style);

Save the result result obtained by applying the style stylesheet +to an open FILE * I/O. +This does not close the FILE file

file : a FILE * I/O
result : the result xmlDocPtr
style : the stylesheet
Returns :the number of byte written or -1 in case of failure.


xsltSaveResultToFd ()

int         xsltSaveResultToFd              (int fd,
+                                             xmlDocPtr result,
+                                             xsltStylesheetPtr style);

Save the result result obtained by applying the style stylesheet +to an open file descriptor +This does not close the descriptor.

fd : a file descriptor
result : the result xmlDocPtr
style : the stylesheet
Returns :the number of byte written or -1 in case of failure.



<<< Previous PageHomeUp 
xsltInternals 
\ No newline at end of file diff --git a/doc/libxslt.sgml b/doc/libxslt.sgml new file mode 100644 index 00000000..eff2b432 --- /dev/null +++ b/doc/libxslt.sgml @@ -0,0 +1,76 @@ + + + + + + + +]> + + + + Gnome XSLT Library Reference Manual + + + Daniel + Veillard + +
+ Daniel.Veillard@imag.fr +
+
+
+
+ + 2001 + Daniel Veillard + + + + Permission is granted to make and distribute verbatim + copies of this manual provided the copyright notice and this + permission notice are preserved on all copies. + + Permission is granted to copy and distribute modified + versions of this manual under the conditions for verbatim + copying, provided also that the entire resulting derived work is + distributed under the terms of a permission notice identical to + this one. + + Permission is granted to copy and distribute translations + of this manual into another language, under the above conditions + for modified versions. + + + + This manual documents the interfaces of the libxslt + library and has some short notes to help get you up to speed + with using the library. + +
+ + + Libxml Programming Notes + + Libxml is an XSLT toolkit library, it allows to transform + XML documents. It uses the XML parser, tree and XPath functionnalities + of libxml2 + + + Libxslt Library Reference + + This section contains the API reference for libxslt. All + the public interfaces are documented here. This reference guide is + build by extracting comments from the code sources. + + &xslt; + &functions; + &pattern; + &templates; + &transform; + &xsltInternals; + &xsltutils; + +
+ diff --git a/doc/xslt.html b/doc/xslt.html new file mode 100644 index 00000000..992e20f1 --- /dev/null +++ b/doc/xslt.html @@ -0,0 +1,174 @@ + + + The XML C library for Gnome + + + + + +

+ +

The XSLT C library for Gnome

+ +

libxslt

+ +

+ + +

Introduction

+ +

This document describes libxslt, the +XSLT C library developped for the Gnome project.

+ +

Here are some key points about libxslt:

+
    +
  • Libxslt is a C implementation
  • +
  • Libxslt is based on libxml for XML parsing, tree manipulation and XPath + support
  • +
  • It is written in plain C, making as few assumptions as possible, and + sticking closely to ANSI C/POSIX for easy embedding. Should works on + Linux/Unix/Windows.
  • +
  • This library is released under the GNU LGPL. If you are + not happy with this, drop me a mail.
  • +
+ +

Documentation

+ +

There are some on-line resources about using libxml:

+
    +
  1. Check the API + documentation automatically extracted from code comments (using gtk + doc).
  2. +
  3. :ook at the mailing-list archive.
  4. +
+ +

Reporting bugs and getting help

+ +

Well, bugs or missing features are always possible, and I will make a point +of fixing them in a timely fashion. The best way to report a bug is to use the +Gnome bug tracking +database (make sure to use the "libxslt" module name). I look at reports +there regularly and it's good to have a reminder when a bug is still open. +Check the instructions on +reporting bugs and be sure to specify that the bug is for the package +libxslt.

+ +

There is also a mailing-list xml@rpmfind.net for libxml and libxslt, with +an on-line archive. To subscribe to +this majordomo based list, send a mail message to majordomo@rpmfind.net with "subscribe +xml" in the content of the message.

+ +

Alternatively, you can just send the bug to the xml@rpmfind.net list, if it's really libxml +related I will approve it..

+ +

Of course, bugs reports with a suggested patch for fixing them will +probably be processed faster.

+ +

If you're looking for help, a quick look at the list archive may actually +provide the answer, I usually send source samples when answering libxml usage +questions. The auto-generated +documentantion is not as polished as I would like (I need to learn more +about Docbook), but it's a good starting point.

+ +

How to help

+ +

You can help the project in various ways, the best thing to do first is to +subscribe to the mailing-list as explained before, check the archives and the Gnome bug +database::

+
    +
  1. provide patches when you find problems
  2. +
  3. provide the diffs when you port libxslt to a new platform. They may not + be integrated in all cases but help pinpointing portability problems + and
  4. +
  5. provice documentation fixes (either as patches to the code comments or + as HTML diffs).
  6. +
  7. provide new documentations pieces (translations, examples, etc ...)
  8. +
  9. Check the TODO file and try to close one of the items
  10. +
  11. take one of the points raised in the archive or the bug database and + provide a fix. Get in touch with + me before to avoid synchronization problems and check that the + suggested fix will fit in nicely :-)
  12. +
+ +

Downloads

+ +

The latest versions of libxslt can be found on rpmfind.net or on the Gnome FTP server either +as a source +archive or RPM packages. +(NOTE that you need both the libxml2 and libxml2-devel +packages installed to compile applications using libxml.)

+ +

Contribs:

+ +

I do accept external contributions, especially if compiling on another +platform, get in touch with me to upload the package. I will keep them in the +contrib directory

+ +

Libxslt is also available from CVS:

+ + +

News

+ +

CVS only : check the Changelog file +for a really accurate description

+ +

0.0.1: Jan 25 2000

+
    +
  • first alpha version released at the same time as libxml2-2.2.12
  • +
  • Framework in place, should work on simple examples, but far from being + feature complete
  • +
+ +

The xsltproc command

+ +

This program is the simplest way to use libxslt from the command line, it +takes as first argument the path or URL to an XSLT stylesheet. the next +arguments are filenames or URIs of the inputs to be processed. The output of +the processing is redirected on the standard output.

+ +

The programming API

+ +

@@TODO

+ +

Contributions

+ +

+ +

Daniel Veillard

+ +

$Id$

+ + diff --git a/libxslt/xsltInternals.h b/libxslt/xsltInternals.h index 7a645851..7250e7c3 100644 --- a/libxslt/xsltInternals.h +++ b/libxslt/xsltInternals.h @@ -120,7 +120,7 @@ struct _xsltStylesheet { /* * The in-memory structure corresponding to an XSLT Transformation */ -typedef enum xsltOutputType { +typedef enum { XSLT_OUTPUT_XML = 0, XSLT_OUTPUT_HTML, XSLT_OUTPUT_TEXT