Re: [xslt] question on extension elements



On Thu, Feb 28, 2002 at 09:12:32AM -0700, Vakoc, Mark wrote:
> 
> I've written many extension functions and elements for libxslt, but they
> have never had to deal with children nodes.
> 
> I want to write an extension function that can handle something like this:
> 
> <xsl:template match="mynode">
> <xsl:variable name="results">
> <gss:process-node-set>
>  <SQLTABLE name="F0101">
>   <SELECTION><ADDRESS_BOOK value="{@abnumber}"/></SELECTION
>   <SEQUENCING><xsl:copy-of select="SEQUENCING"/></SEQUENCING>
>  </SQLTABLE>
> </gss:process-node-set>
> </xsl:variable>
> 
> (SQLTABLE defines a SQL query, and the results are added as children to the
> SQLTABLE node)
> 
> I know how to get to the children nodes of gss:process-node-set, but before
> I can use them, they have have to have their attributes evaluated and
> translated to actual values.  So, within an extension element, how do I
> evaluate the children nodes so the attributes that use {} are subsitutued
> and any <xsl:/> functions are evaluated?

  use xsltAttrTemplateValueProcess() to get the string resulting from the
evaluation of each attribute value. There is no function to do this on a
subtree scale. You really need to process each parameter and check it.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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