xsl-list
[Top] [All Lists]

RE: replacing an output block

2005-06-27 05:11:21
The gist of my problem is just as you stated. However
I wasnt too confident how to write out a third
stylesheet to deal with this problem.

I'll give it a try and perhaps post any issues that I
might encounter.

Thanks
Rahil



--- Michael Kay <mike(_at_)saxonica(_dot_)com> wrote:

You're thinking procedurally. There's no "earlier"
or "later" in XSLT -
order of execution is undefined.

Sounds as if you need a two phase stylesheet. Phase
1 computes a result tree
and puts this in a variable. Phase 2 considers
whether a better result is
possible: if so, it applies a transformation to the
first result (replacing
the relevant subtree with a better version and
copying everything else
across unchanged); if not, it simply returns the
result of the first phase.

Michael Kay
http://www.saxonica.com/


-----Original Message-----
From: Rahil [mailto:qamar_rahil(_at_)yahoo(_dot_)co(_dot_)uk] 
Sent: 27 June 2005 11:23
To: XSL List
Subject: [xsl] replacing an output block

Hi

I want to replace a block of an HTML TABLE output
in case 
better results 
are obtained later. So I have the result in
'first.html' of some 
processing in 'first.xsl'.

first.html -- output

<HTML><BODY>
    <TABLE>
          <TR>
                <TD>Want to replace this block
with new output</TD>
                <TD>Some other results from
first.xsl</TD>
           </TR>
    </TABLE>
</BODY></HTML>

The block shown above has been copied as such in
second.xsl using 
<xsl:copy> and <xsl:copy-of>.

However as a result of processin some other block
a better match is 
obtained for the TR/TD[1] above and I would like
to replace this new 
finding with the old one. Given that I can easily
locate the position 
where this TR/TD[1] occurs, how do I overwrite the
earlier output ?

Would appreciate any help or suggestions.

Thanks
Rahil






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






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





                
___________________________________________________________ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.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>
--~--



<Prev in Thread] Current Thread [Next in Thread>