RE: [xslt] str:tokenize behavior
- From: "Vakoc, Mark" <Mark_Vakoc jdedwards com>
- To: "'xslt gnome org'" <xslt gnome org>
- Subject: RE: [xslt] str:tokenize behavior
- Date: Wed, 23 Apr 2003 22:36:07 -0600
> Yup, looks like the problem. Plus the tokenize function returns
> an XPATH_NODESET intead of a XPATH_XSLT_TREE making the detection
>nearly impossible ... In a nutshell seems:
> - the tokenize function need to return a XPATH_XSLT_TREE (easy)
> - xsltForEach need to detect the case of and XPATH_XSLT_TREE
> and iterate on the children instead of the document node.
Hmmm... This could be a little tough. If the function returns
XPATH_XSLT_TREE and xsltForEach treats this as a node set then that would
allow essentially allow xsltForEach to work against any RTF, which isn't
correct, such as below
<xsl:variable name="var"><node/><node/><node/></xsl:variable>
<xsl:for-each select="$var">.....</xsl:for-each>
Somehow we need to know that the RTF returned by extension functions such as
str:tokenize isn't a RTF like the one created above. That is why I had it
return the XPATH_NODESET object type.
Might the solution be to internally create a new xpath object type, say
XPATH_XSLT_NODESET for extension functions that return RTF node-sets? This
way libxslt can know when iterating across the nodes using xsl:for-each and
xsl:apply-templates against a extension function's return RTF is legal and
not perform an automatic node-set() conversion against actual RTFs.
I'll look into this tomorrow as well.
Mark
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]