xsl-list
[Top] [All Lists]

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

2006-11-20 03:06:35
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






















        

        
                
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com

--~------------------------------------------------------------------
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>
--~--