Re: [xsl] writing out of the current boundary of an element

Subject: Re: [xsl] writing out of the current boundary of an element
From: Florent Georges <darkman_spam@xxxxxxxx>
Date: Mon, 20 Nov 2006 11:06:15 +0100 (CET)
Nima Kaviani wrote:

  Hi

> for example having the output below written by my XSLT and
> considering that I am filling the values inside the inner,
> I need to write another element, as a child of
> <test:Base>, but based on the values I obtain while I am
> writing the inner element

  IMHO, you have three options, if I correctly understood
your description:

    1/ compute both elements locally, and individually of
       each other.  So you'll need to compute twice the
       intermediate value both values are based on;

    2/ compute the intermediate value once, and then use it
       while creating the two elements.  They will be
       created either in the same template or in templates
       applied from the template that computes the
       intermediate value, passing it by parameter.

    3/ in XSLT 2.0, you can use micro-pipelining to create a
       first version of your output, without the second
       element, then use it as the input of a second
       transformation in your same stylesheet, to add the
       second element, knowing what the intermediate tree
       looks like.

  In XSLT 1.0, the only way to achieve 3/ is with two
separate stylesheets, and running them as two separate
transformations (or maybe by using extensions, of course).

  Regards,

--drkm






















	

	
		
___________________________________________________________________________ 
Dicouvrez une nouvelle fagon d'obtenir des riponses ` toutes vos questions ! 
Profitez des connaissances, des opinions et des expiriences des internautes sur Yahoo! Questions/Riponses 
http://fr.answers.yahoo.com

Current Thread