Thanks Mukul and David for the clarifications you
provided.
Much appreciate your help.
Rahil
--- Mukul Gandhi <mukul_gandhi(_at_)yahoo(_dot_)com> wrote:
Hi Rahil,
--- Rahil Qamar <qamar_rahil(_at_)yahoo(_dot_)co(_dot_)uk> wrote:
<xsl:variable name="rtf">
<temp>
<xsl:copy-of select="TD" />
</temp>
</xsl:variable>
So the variable 'rtf' contained the entire TD
content.
The variable rtf (Result Tree Fragment) contains a
XML
fragment, which is part of the Result Tree ..
<xsl:for-each select="$rtf/temp/TD[generate-id() =
generate-id(key('by-td', .)[1])]">
<xsl:copy-of select="." />
</xsl:for-each>
Then for each TD in the $rtf you checked whether
there
was a duplicate TD present bz comparing it with
the
first occurrence of TD.
Yes, thats true ..
Well I must thank you for providing me with a
solution. I had truly been struggling ! :)
I thank you for the nice problem you posted ..
Regards,
Mukul
Thanks
Rahil
--- Mukul Gandhi <mukul_gandhi(_at_)yahoo(_dot_)com> wrote:
Hi Rahil,
Please read my thoughts below your sentences
..
You
posted an interesting problem for me to find an
answer
.. Thanks..
--- Rahil Qamar <qamar_rahil(_at_)yahoo(_dot_)co(_dot_)uk> wrote:
(I am glad I was able to help ..)
The solution you posted worked even with my
Saxon
8.1.1 processor using XSLT 2.0.
Im getting the output just as I wanted but Im
intrigued about the functionality of the
<temp>
node
and how it eliminated the duplicates at a
later
stage.
I used temp as a convenience element, using
which
I
was able to distinguish element hierarchy
properly
..
We could write the stylesheet using without it
also
..
But I am not sure at this moment, how we should
do
that? I think David answered the question to
this
some
time back .. Please ask him :)
Just so I know how to resolve a similar query
in
future could you please explain what you did
in
the
<template match="TABLE/TR/TR"> block ?
In this template, I matched a pattern with a
portion
of the result tree (which was body of the
template)
..
I think the explanation could be as simple as
that
;)
Regards,
Mukul
Thanks again
Rahil
--- Mukul Gandhi <mukul_gandhi(_at_)yahoo(_dot_)com>
wrote:
Hi David,
Please read my response below your
comments
..
--- David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk> wrote:
The stylesheet uses node-set function,
and
Muenchian
Grouping (over a RTF) ..
It _needs_ to use a node-set function, but
as
posted
you did not use it
(you need common:node-set($rtf))
Sorry if I am wrong. I tested the
stylesheet,
and
it
ran successfully with Saxon.
The stylesheet is tested with Saxon 8.4.
It's best not to test xslt 1 stylesheets
with
an
xslt2 processor.
As (as in this case) many things that
generate
an
error in xslt1 will
not be reported.
You are always right :)
Regards,
Mukul
David
________________________________________________________________________
This e-mail has been scanned for all
viruses
by
Star. The
service is powered by MessageLabs. For
more
information on a proactive
anti-virus service working around the
clock,
around
the globe, visit:
http://www.star.net.uk
________________________________________________________________________
--~------------------------------------------------------------------
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>
--~--
=== message truncated ===
___________________________________________________________
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail
http://uk.messenger.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>
--~--