Re: [xslt] XSLT conformance issues



Le 11/07/01 13:35:01, Thomas Broyer a écrit :
> Issue ext3:
>   extension functions that are part of extension modules must be
>   registered in the xsltExtInitFunction callback. This function is
>   called only if the prefix is declared an extension-element-prefix.
>   Thus extension functions are available only if their prefix is
>   declared an extension-element-prefix, which doesn't conform to [14.2
>   Extension Functions]
>   Like top-level elements, extension functions are available as soon as
>   their namespaces are _declared_, no need to declare them as extensions.
> 
>   Resolution:
>   Add a function lookup framework to libxml/XPath similar to the
>   variable lookup already available.
>   libxslt then search for extension functions in its global hash table.
>   typedef xmlXPathFunction
>           (*xmlXPathFunctionLookupFunc)   (void *ctxt,
>                                            const xmlChar *name,
>                                            const xmlChar *ns_uri);
>   void    xmlXPathRegisterFunctionLookup  (xmlXPathContextPtr ctxt,
>                                            xmlXPathFunctionLookupFunc f,
>                                            void *funcCtxt);

Another way is to call the xsltExtInitFunction for each declared prefix
(even if not declared as extension-element-prefix)
[NOTE: for each namespace node in the hole stylesheet (cf. also Issue
ext4), as a top-level element may carry its namespace declaration -- e.g. a
func:function element may have an xmlns:func declaration, with no
xmlns:func declaration in the xsl:stylesheet element]

Issue ext4: missing feature
  xsl:extension-element-prefixes isn't implemented. More generally,
  "local extensions" aren't implemented (a prefix is registered and
  extension prefix at stylesheet level)
  This is needed for EXSLT - Functions for example:
    "The EXSLT - Functions namespace (http://exslt.org/functions) is
     designated as an extension namespace within the subtree rooted at
     a func:function element.  The effect of this is as if the
     func:function element had a xsl:extension-element-prefixes
     attribute defined on it, with one of the values within it being
     the prefix used for the EXSLT - Functions namespace (see [14.1
     Extension Elements] in [XSLT])."

  Resolution: (open)

Tom.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]