## functions

functions - interface for the XSLT functions not from XPath

a set of extra functions coming from XSLT but not in XPath

Author(s): Daniel Veillard and Bjorn Reese <breese@users.sourceforge.net>

## Synopsis

    #define XSLT_REGISTER_FUNCTION_LOOKUP;
    xmlXPathFunction	xsltXPathFunctionLookup	(void * vctxt,
    						 const xmlChar * name,
    						 const xmlChar * ns_uri);
    void	xsltFunctionAvailableFunction	(xmlXPathParserContextPtr ctxt,
    					 int nargs);
    void	xsltFormatNumberFunction	(xmlXPathParserContextPtr ctxt,
    					 int nargs);
    void	xsltRegisterAllFunctions	(xmlXPathContextPtr ctxt);
    void	xsltKeyFunction			(xmlXPathParserContextPtr ctxt,
    					 int nargs);
    void	xsltUnparsedEntityURIFunction	(xmlXPathParserContextPtr ctxt,
    					 int nargs);
    void	xsltDocumentFunction		(xmlXPathParserContextPtr ctxt,
    					 int nargs);
    void	xsltSystemPropertyFunction	(xmlXPathParserContextPtr ctxt,
    					 int nargs);
    void	xsltElementAvailableFunction	(xmlXPathParserContextPtr ctxt,
    					 int nargs);
    void	xsltGenerateIdFunction		(xmlXPathParserContextPtr ctxt,
    					 int nargs);

## Description

## Details

### Macro XSLT_REGISTER_FUNCTION_LOOKUP

    #define XSLT_REGISTER_FUNCTION_LOOKUP;

Registering macro, not general purpose at all but used in different modules.

### 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

### 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

### 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

### 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

### 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

### 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

### xsltRegisterAllFunctions ()

    void	xsltRegisterAllFunctions	(xmlXPathContextPtr ctxt)

Registers all default XSLT functions in this context

`ctxt`: | the XPath context

### 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

### 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

### xsltXPathFunctionLookup ()

    xmlXPathFunction	xsltXPathFunctionLookup	(void * vctxt,
    						 const xmlChar * name,
    						 const xmlChar * ns_uri)

This is the entry point when a function is needed by the XPath interpretor.

`vctxt`: | a void * but the XSLT transformation context actually
`name`: | the function name
`ns_uri`: | the function namespace URI
`Returns`: | the callback function or NULL if not found