Eneboo - Documentación para desarrolladores
'defines' | Funciones
Referencia del Archivo src/libxslt/libxslt/namespaces.c
#include "libxslt.h"
#include <string.h>
#include <stdio.h>
#include <libxml/xmlmemory.h>
#include <libxml/tree.h>
#include <libxml/hash.h>
#include <libxml/xmlerror.h>
#include <libxml/uri.h>
#include "xslt.h"
#include "xsltInternals.h"
#include "xsltutils.h"
#include "namespaces.h"
#include "imports.h"

'defines'

#define IN_LIBXSLT

Funciones

void xsltNamespaceAlias (xsltStylesheetPtr style, xmlNodePtr node)
xmlNsPtr xsltGetSpecialNamespace (xsltTransformContextPtr ctxt, xmlNodePtr invocNode, const xmlChar *nsName, const xmlChar *nsPrefix, xmlNodePtr target)
xmlNsPtr xsltGetNamespace (xsltTransformContextPtr ctxt, xmlNodePtr cur, xmlNsPtr ns, xmlNodePtr out)
xmlNsPtr xsltGetPlainNamespace (xsltTransformContextPtr ctxt, xmlNodePtr cur, xmlNsPtr ns, xmlNodePtr out)
xmlNsPtr xsltCopyNamespaceList (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNsPtr cur)
xmlNsPtr xsltCopyNamespace (xsltTransformContextPtr ctxt ATTRIBUTE_UNUSED, xmlNodePtr elem, xmlNsPtr ns)
void xsltFreeNamespaceAliasHashes (xsltStylesheetPtr style)

Documentación de los 'defines'

#define IN_LIBXSLT

Documentación de las funciones

xmlNsPtr xsltCopyNamespace ( xsltTransformContextPtr ctxt  ATTRIBUTE_UNUSED,
xmlNodePtr  elem,
xmlNsPtr  ns 
)

xsltCopyNamespace: : a transformation context : the target element node : the namespace node

Copies a namespace node (declaration). If is not NULL, then the new namespace will be declared on .

Returns: a new xmlNsPtr, or NULL in case of an error.

xmlNsPtr xsltCopyNamespaceList ( xsltTransformContextPtr  ctxt,
xmlNodePtr  node,
xmlNsPtr  cur 
)

xsltCopyNamespaceList: : a transformation context : the target node : the first namespace

Do a copy of an namespace list. If is non-NULL the new namespaces are added automatically. This handles namespaces aliases. This function is intended only for *internal* use at transformation-time for copying ns-declarations of Literal Result Elements.

Called by: xsltCopyTreeInternal() (transform.c) xsltShallowCopyElem() (transform.c)

REVISIT: This function won't be used in the refactored code.

Returns: a new xmlNsPtr, or NULL in case of error.

void xsltFreeNamespaceAliasHashes ( xsltStylesheetPtr  style)

xsltFreeNamespaceAliasHashes: : an XSLT stylesheet

Free up the memory used by namespaces aliases

xmlNsPtr xsltGetNamespace ( xsltTransformContextPtr  ctxt,
xmlNodePtr  cur,
xmlNsPtr  ns,
xmlNodePtr  out 
)

xsltGetNamespace: : a transformation context : the input node : the namespace : the output node (or its parent)

Find a matching (prefix and ns-name) ns-declaration for the requested ->prefix and ->href in the result tree. If none is found then a new ns-declaration will be added to . If, in this case, the given prefix is already in use, then a ns-declaration with a modified ns-prefix be we created.

Called by:

  • xsltCopyPropList() (*not* anymore)
  • xsltShallowCopyElement()
  • xsltCopyTreeInternal() (*not* anymore)
  • xsltApplySequenceConstructor() (*not* in the refactored code),
  • xsltElement() (*not* anymore)

Returns a namespace declaration or NULL in case of namespace fixup failures or API or internal errors.

xmlNsPtr xsltGetPlainNamespace ( xsltTransformContextPtr  ctxt,
xmlNodePtr  cur,
xmlNsPtr  ns,
xmlNodePtr  out 
)

xsltGetPlainNamespace: : a transformation context : the input node : the namespace : the result element

Obsolete. *Not* called by any Libxslt/Libexslt function. Exaclty the same as xsltGetNamespace().

Returns a namespace declaration or NULL in case of namespace fixup failures or API or internal errors.

xmlNsPtr xsltGetSpecialNamespace ( xsltTransformContextPtr  ctxt,
xmlNodePtr  invocNode,
const xmlChar nsName,
const xmlChar nsPrefix,
xmlNodePtr  target 
)

xsltGetSpecialNamespace: : the transformation context : the invoking node; e.g. a literal result element/attr; only used for error reports : the namespace name (or NULL) : the suggested namespace prefix (or NULL) : the result element on which to anchor a namespace

Find a matching (prefix and ns-name) ns-declaration for the requested and in the result tree. If none is found then a new ns-declaration will be added to . If, in this case, the given prefix is already in use, then a ns-declaration with a modified ns-prefix be we created. Note that this function's priority is to preserve ns-prefixes; it will only change a prefix if there's a namespace clash. If both and are NULL, then this will try to "undeclare" a default namespace by declaring an xmlns="".

Returns a namespace declaration or NULL.

void xsltNamespaceAlias ( xsltStylesheetPtr  style,
xmlNodePtr  node 
)

xsltNamespaceAlias: : the XSLT stylesheet : the xsl:namespace-alias node

Read the stylesheet-prefix and result-prefix attributes, register them as well as the corresponding namespace.

 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'