A
awebguynow
I know its redundant but thats what this report calls for.
For every node except the first, I want to output a pair of nodes: the
current and prev one.
For sake of example, lets call the node <qsales> Quarterly Sales. (and
includes children)
If I could use an array syntax, it would be:
<qsales>[1]
<qsales>[2]
<qsales>[2]
<qsales>[3]
<qsales>[3]
<qsales>[4]
So I'm playing with preceding-sibling and hoping PHP5 is using XSLT
2.0 ie: max()
libxslt Version 1.1.7 phpinfo() notes
libxslt compiled against libxml Version 2.6.11 phpinfo() notes
Actually, doing some CL tests on WinXP, using jdk1.4.0
I'll have to research to find out what lib is being used there.
right now, I'm using a sort and then attempting something like this
(psuedo-code)
<xsl:variable name="ndx" select="position()" /> // having problems
defining var in root template
call-template <xsl:with-param name="node" select="." />
call-template <xsl:with-param name="node"
select="../qsales[position()=$ndx-1]" />
Another alternative, as I brainstorm
could I find the max() position() of preceding-sibling ?
One of the children of the nodes, is actually an index, but I'm
doubtful I can use it
Select node where <qsales>.index = 3 then use call-template
Re: Outputting Pairs - can I get a little help ?
For every node except the first, I want to output a pair of nodes: the
current and prev one.
For sake of example, lets call the node <qsales> Quarterly Sales. (and
includes children)
If I could use an array syntax, it would be:
<qsales>[1]
<qsales>[2]
<qsales>[2]
<qsales>[3]
<qsales>[3]
<qsales>[4]
So I'm playing with preceding-sibling and hoping PHP5 is using XSLT
2.0 ie: max()
libxslt Version 1.1.7 phpinfo() notes
libxslt compiled against libxml Version 2.6.11 phpinfo() notes
Actually, doing some CL tests on WinXP, using jdk1.4.0
I'll have to research to find out what lib is being used there.
right now, I'm using a sort and then attempting something like this
(psuedo-code)
<xsl:variable name="ndx" select="position()" /> // having problems
defining var in root template
call-template <xsl:with-param name="node" select="." />
call-template <xsl:with-param name="node"
select="../qsales[position()=$ndx-1]" />
Another alternative, as I brainstorm
could I find the max() position() of preceding-sibling ?
One of the children of the nodes, is actually an index, but I'm
doubtful I can use it
Select node where <qsales>.index = 3 then use call-template
Re: Outputting Pairs - can I get a little help ?