xsl-list
[Top] [All Lists]

Re: Omnimark vs. XSL (Saxon) Challenge

2004-03-17 03:00:24
On 16.03.2004 (21:26 Uhr +0100), bry(_at_)itnisk(_dot_)com wrote:

well I have a lot of stuff in a language not
xslt to clear up right now, and saxon is not
running to good on my system at the moment
so I can't sit and play with it but some
observations:

Thanks!

just reading through your input xml I get
the feeling that what you actually mean is
that if there isn't a colspan then the
colspan= 1, is that correct. So I figure
that in that case checking if @colspan is
greater than 1 is redundant, one should just
check if @colspan exists.

However in that case isn't this the same as
what you're looking for:

<xsl:value-of select="sum($root//row
[1]/entry/@colspan) + count($root//row
[1]/entry[not(@colspan)])"/>

Well, colspan="1" would be legal, so I checked the value. But your way of 
adding is definitely more elegant.

I really don't know what the random-nodes.r
and c are for, not having much time here but
<xsl:variable name =" random-nodes-r "
select =" document('')//* " />
<xsl:variable name =" random-nodes-c "
select =" document('')//* " />

is redundant, since variables in xslt are
constants you only need declare one of these
and then use that one all the time.

I use this set of nodes just for the sake of looping a certain number of times. 
In Jeni Tennison's book "XSLT and XPath On The Edge" it is called "The Piez 
Method". You are right, I don't need two variables (just an old habit...).

Thanks,

- Michael
-- 
_____________________________________________________________
Dipl.-Ing. Michael Müller-Hillebrand
                                     
"Mehr Effizienz für Wissensarbeiter" --> http://cap-studio.de

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



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