[ 
http://issues.apache.org/jira/browse/XALANJ-2088?page=comments#action_62128 ]
     
Mukul Gandhi commented on XALANJ-2088:
--------------------------------------

Hello,
I think I am wrong on my last comment..
Xalan should be executing as per rules.. 

The suggestion given by Mr. Kesselman is nice. But I think it has slight 
performance overhead. To simulate initial mode using PARAM argument, we need to 
write a xsl:if or xsl:choose within
<xsl:template match="/">
This I guess is extra processing..

If the XSLT processor provides mechanism to provide initial mode (m) to the 
stylesheet, the processor can directly pick the root template of mode "m" .
But on the other hand I also think, if the processor has to do this 
initialization activity (i.e. determining the root template with mode "m") , 
this also takes extra processing steps..
So in both cases, extra time is needed to select the appropriate root template..

I am not sure if passing an initial mode from command line will be faster to 
execute, or implementing with the workaround which  Mr. Kesselman suggested.

But if performance difference between the 2 approaches is small, I feel this 
feature may not be implemented.

I am keen to see Xalan implementing XSLT 2.0 specification! Is it possible I 
can offer my expertise? I know Xalan team is filled with talent. But I wish to 
be part of this effort..

I want to participate in architectural and design discussions, and contribute 
code for XSLT 2.0/XPath 2.0 implementation.. I am good at Java, and understand 
XSLT well.

Regards,
Mukul

> Passing initial mode from command line
> --------------------------------------
>
>          Key: XALANJ-2088
>          URL: http://issues.apache.org/jira/browse/XALANJ-2088
>      Project: XalanJ2
>         Type: Improvement
>   Components: Xalan-CmdLine
>     Versions: 2.6
>  Environment: Windows 2000 Prof, Xalan-J 2.6.0, JRE 1.4.2_03
>     Reporter: Mukul Gandhi
>     Priority: Minor

>
> Hello,
> For this problem, I need to compare Xalan-J with Saxon and MSXSL. Both Saxon 
> and MSXSL allow an initial mode to be passed to the transformation. Saxon has 
> option -im , and MSXSL has option -m . That is we should be able to define a 
> template rule for root node with a particular mode.
> i.e. , as
> <xsl:template match="/" mode="x">
>   <!-- -->
> </xsl:template>
> This template rule does not give syntax error with Xalan(it should'nt as it 
> is a valid rule according to XSLT 1.0 grammer). But we cannot invoke it from 
> command line.. As Xalan command line does not have option to pass initial 
> mode.
> We can only invoke template rules with default mode , i.e.
> <xsl:template match="/">
>   <!-- -->
> </xsl:template>
> The XSLT 1.0 spec explicitly says (section "5.8 Built-in Template Rules")..
> <quote>
> The following shows the equivalent of the built-in template rule for mode m.
> <xsl:template match="*|/" mode="m">
>   <xsl:apply-templates mode="m"/>
> </xsl:template>
> </quote>
> This gives impression that the template rule for root node in an initial mode 
> exists. So the XSLT processor should provide an option to pass initial mode 
> to the transformation..
> But I cannot find anywhere in spec that this is a mandatory requirement(i.e. 
> passing initial mode). So I have not called this a bug, but as a "improvement 
> request" ..
> Xalan might be providing this feature. But I am not aware about it.. If it 
> does, then I am sorry.
> Regards,
> Mukul

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to