## imports

imports - interface for the XSLT import support

macros and fuctions needed to implement and access the import tree

Author(s): Daniel Veillard

## Synopsis

    #define XSLT_GET_IMPORT_INT;
    #define XSLT_GET_IMPORT_PTR;
    int	xsltFindElemSpaceHandling	(xsltTransformContextPtr ctxt,
    					 xmlNodePtr node);
    xsltTemplatePtr	xsltFindTemplate	(xsltTransformContextPtr ctxt,
    					 const xmlChar * name,
    					 const xmlChar * nameURI);
    int	xsltNeedElemSpaceHandling	(xsltTransformContextPtr ctxt);
    xsltStylesheetPtr	xsltNextImport	(xsltStylesheetPtr cur);
    int	xsltParseStylesheetImport	(xsltStylesheetPtr style,
    					 xmlNodePtr cur);
    int	xsltParseStylesheetInclude	(xsltStylesheetPtr style,
    					 xmlNodePtr cur);

## Description

## Details

### Macro XSLT_GET_IMPORT_INT

    #define XSLT_GET_IMPORT_INT;

A macro to import intergers from the stylesheet cascading order.

### Macro XSLT_GET_IMPORT_PTR

    #define XSLT_GET_IMPORT_PTR;

A macro to import pointers from the stylesheet cascading order.

### xsltFindElemSpaceHandling ()

    int	xsltFindElemSpaceHandling	(xsltTransformContextPtr ctxt,
    					 xmlNodePtr node)

Find strip-space or preserve-space information for an element respect the import precedence or the wildcards

`ctxt`: | an XSLT transformation context
`node`: | an XML node
`Returns`: | 1 if space should be stripped, 0 if not, and 2 if everything should be CDTATA wrapped.

### xsltFindTemplate ()

    xsltTemplatePtr	xsltFindTemplate	(xsltTransformContextPtr ctxt,
    					 const xmlChar * name,
    					 const xmlChar * nameURI)

Finds the named template, apply import precedence rule. REVISIT TODO: We'll change the nameURI fields of templates to be in the string dict, so if the specified @nameURI is in the same dict, then use pointer comparison. Check if this can be done in a sane way. Maybe this function is not needed internally at transformation-time if we hard-wire the called templates to the caller.

`ctxt`: | an XSLT transformation context
`name`: | the template name
`nameURI`: | the template name URI
`Returns`: | the xsltTemplatePtr or NULL if not found

### xsltNeedElemSpaceHandling ()

    int	xsltNeedElemSpaceHandling	(xsltTransformContextPtr ctxt)

Checks whether that stylesheet requires white-space stripping

`ctxt`: | an XSLT transformation context
`Returns`: | 1 if space should be stripped, 0 if not

### xsltNextImport ()

    xsltStylesheetPtr	xsltNextImport	(xsltStylesheetPtr cur)

Find the next stylesheet in import precedence.

`cur`: | the current XSLT stylesheet
`Returns`: | the next stylesheet or NULL if it was the last one

### xsltParseStylesheetImport ()

    int	xsltParseStylesheetImport	(xsltStylesheetPtr style,
    					 xmlNodePtr cur)

parse an XSLT stylesheet import element

`style`: | the XSLT stylesheet
`cur`: | the import element
`Returns`: | 0 in case of success -1 in case of failure.

### xsltParseStylesheetInclude ()

    int	xsltParseStylesheetInclude	(xsltStylesheetPtr style,
    					 xmlNodePtr cur)

parse an XSLT stylesheet include element

`style`: | the XSLT stylesheet
`cur`: | the include node
`Returns`: | 0 in case of success -1 in case of failure