xsl-list
[Top] [All Lists]

Re: [xsl] "Tunneling" a parameter in document order

2012-04-13 03:31:51
Hi Andrew,

As I asked for the sample I should probably just say: that example is
way too complicated for me, it would require investing a fair amount
of time just to understand the requirement.

that's why I did not give an example in the first place :-) A simpler example, 
unfortunately, would not be "covering the various possibilities".

As for the basic requirement, I tried to describe it with: "Keeping a global 
variable's value current while doing a depth-first traversal of a document, 
where the variable's value is not scoped by either the document's element 
hierarchy, nor the nesting of XSLT template calls."

I'll try in a different way: Imagine someone has laid a rope along the path of 
a depth-first traversal of the document tree. The initial color of the rope is 
red. However, any node in the tree may decide to change its color (e.g. to 
green), which the rope then has from the start of that node on for all later 
(=following::) ones until we reach the document end, or up to the next node 
that chooses to change the rope's color again. All nodes along the path can 
query the rope's color (that's the parameter I need to 'tunnel' through the 
document in document order) it has when it reaches them.

Which new color a node changes the rope's color to depends on its context 
and(!) the current color of the rope it has when it reaches it. 

I don't know how to better describe the problem without confusing you even more.

Regards, Christian
--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--