You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Mukul Gandhi (JIRA)" <xa...@xml.apache.org> on 2005/03/30 11:45:15 UTC

[jira] Created: (XALANJ-2088) Passing initial mode from command line

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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2088) Passing initial mode from command line

Posted by "Mukul Gandhi (JIRA)" <xa...@xml.apache.org>.
     [ 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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2088) Passing initial mode from command line

Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2088?page=comments#action_62211 ]
     
Brian Minchau commented on XALANJ-2088:
---------------------------------------

There is a JAXP implication for this issue.

> 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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2088) Passing initial mode from command line

Posted by "Mukul Gandhi (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2088?page=comments#action_61921 ]
     
Mukul Gandhi commented on XALANJ-2088:
--------------------------------------

Hello Mr. Bertoni,
  Thanks for your response..

  Here is a small program illustrating your idea.

mode.xml
--------
<root>1</root>

mode.xsl
--------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 

  <xsl:output method="xml" omit-xml-declaration="yes" />
  
  <xsl:template match="/">
    <xsl:apply-templates select="." mode="m" />  
  </xsl:template>  
  
</xsl:stylesheet>

I invoke Xalan like this:
java org.apache.xalan.xslt.Process -in mode.xml -xsl mode.xsl

The output is:
1

So it is sure, that Xalan does have this built in rule ..
<xsl:template match="/" mode="m">
  <xsl:apply-templates mode="m"/>
</xsl:template>

The XSLT 1.0 spec says:
<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>

I think above statement from spec is "referring to non-default mode" for root node.

In my above example, this call:
 <xsl:apply-templates select="." mode="m" /> 

is calling(or resolving to) the built-in rule -
<xsl:template match="/">
  <xsl:apply-templates/>
</xsl:template>
i.e. to a template rule in default mode!
or we can say: a mode "m" rule is resolving to a "default mode" rule.. This mapping seems odd to me.. Or is it the right behaviour? The mode "m" is never available to the stylesheet (in the above example). But the processor is able to resolve the call
<xsl:apply-templates select="." mode="m" />

So I think logically Xalan must provide a means to supply an initial mode to stylesheet!

I cannot find in spec the behaviour in this regard. So it seems a proprietary implementation by Xalan (which seems not quite logical to me)! I would not call it non-conformance.. But my logic makes me think, a XSLT processor must provide means to supply a initial mode to the stylesheet ;)

Please do correct me on any of the points!

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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2088) Passing initial mode from command line

Posted by "Mukul Gandhi (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2088?page=comments#action_64431 ]
     
Mukul Gandhi commented on XALANJ-2088:
--------------------------------------

Hello Mr. Minchau,
  I am happy with the present functionality. But I still feel, if we are able to pass initial mode from command line, its a nice feature. I am not justifying this idea "not due to loss of functionality". But because, it looks very natural.

The example I gave above to simulate this feature (as suggested by Mr. Kesselman) meets the need.. But here, I am passing a "string parameter" from command line (which is the initial mode name). But the processor is calling a default mode template rule (<xsl:template match="/">).. And then, it is invoking the mode specific rule(with a xsl:choose or an xsl:if instruction). I feel(IMHO), it will be more natural, if the XSLT processor directly picks the root node template rule of a particular mode..

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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2088) Passing initial mode from command line

Posted by "David Marston (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2088?page=comments#action_61836 ]
     
David Marston commented on XALANJ-2088:
---------------------------------------

A quick-and-early response reminded me that a template matching "/" in a mode could also be triggered by the root of a document opened via the document function, so the passage you cite does not necessarily imply that the WG expected that such a template would be applied to the root of the original input document.

But if our competition has this capability, maybe we should have it also.

> 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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2088) Passing initial mode from command line

Posted by "Mukul Gandhi (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2088?page=comments#action_62237 ]
     
Mukul Gandhi commented on XALANJ-2088:
--------------------------------------

I am happy that my suggestion was considered significant and was accepted for implementation.. Hoping to see this feature in future Xalan releases..

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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2088) Passing initial mode from command line

Posted by "David Bertoni (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2088?page=comments#action_61900 ]
     
David Bertoni commented on XALANJ-2088:
---------------------------------------

> This gives impression that XSLT processor must have "internal
> processing defined" for a root node for particular mode (other than 
> default). Does Xalan has this rule built-in? If yes, it is not 
> invokable!

Yes, of course it's invokable.  The recommendation does not require a processor have a way to start the transformation in a particular mode.  You could invoke it from your stylesheet like this:

<xsl:template match="/">
  <xsl:apply-templates select="." mode="m" />
</xsl:template>

> If Xalan does'nt have this implementation, then is it not a non-
> conformance?

But it does have that mode.

> 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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2088) Passing initial mode from command line

Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2088?page=comments#action_64402 ]
     
Brian Minchau commented on XALANJ-2088:
---------------------------------------

This issue will be brought to the PMC, and the PMC will decide on whether or not to implement this feature.

> 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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2088) Passing initial mode from command line

Posted by "David Marston (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2088?page=comments#action_61889 ]
     
David Marston commented on XALANJ-2088:
---------------------------------------

If you have
<xsl:template match="/">
...
   <xsl:apply-templates select="." mode="x" />
and there is no template for match="/" mode="x"
then you will use the built-in one.

> 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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2088) Passing initial mode from command line

Posted by "Mukul Gandhi (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2088?page=comments#action_61872 ]
     
Mukul Gandhi commented on XALANJ-2088:
--------------------------------------

Hello Mr. Joe Kesselman,
  Thanks for providing a workaround to this problem. I'll also read your article. Here is a small program I wrote illustrating your idea..

mode.xml
--------
<root/>

mode.xsl
---------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 

  <xsl:output method="xml" omit-xml-declaration="yes" />
  
  <xsl:param name="im" />
  
  <xsl:template match="/">
    <xsl:choose>
      <xsl:when test="$im = 'x'">
         <xsl:apply-templates select="." mode="x" />
      </xsl:when>
      <xsl:when test="$im = 'y'">
         <xsl:apply-templates select="." mode="y" />
      </xsl:when>
      <xsl:otherwise>
        <xsl:copy-of select="*" />      
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  <xsl:template match="/" mode="x">
    <p/>
  </xsl:template>
  
  <xsl:template match="/" mode="y">
    <q/>  
  </xsl:template>
  
</xsl:stylesheet>

Respective Xalan command line are:

1) java org.apache.xalan.xslt.Process -in mode.xml -xsl mode.xsl

output:
<root/>

2) java org.apache.xalan.xslt.Process -in mode.xml -xsl mode.xsl -PARA
M im x

output:
<p/>

3) java org.apache.xalan.xslt.Process -in mode.xml -xsl mode.xsl -PARA
M im y

output:
<q/>

Now I think the debate is.. The XSLT 1.0 spec says.

<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 XSLT processor must have "internal processing defined" for a root node for particular mode (other than default). Does Xalan has this rule built-in? If yes, it is not invokable! If Xalan does'nt have this implementation, then is it not a non-conformance?
Please do correct me on any of the points..

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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Updated: (XALANJ-2088) Passing initial mode from command line

Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2088?page=history ]

Brian Minchau updated XALANJ-2088:
----------------------------------

    fix-priority: fp4

Set fix priority to fp4.

> 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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2088) Passing initial mode from command line

Posted by "Joe Kesselman (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2088?page=comments#action_61837 ]
     
Joe Kesselman commented on XALANJ-2088:
---------------------------------------

A more portable solution would be to code a standard root template which checks a stylesheet parameter (passed in from the environment) and uses that to select among several mode-specific root templates.

An illustration of this approach -- though there I'm using it to gate other selection logic rather than to simply branch to a mode -- can be found in my article at

http://www.ibm.com/developerworks/xml/library/x-styless2/index.html

Search for "Too much! Too many!"


Since that seems able to accomplish the same goal, _portably_,  I'm very dubious about the value of implementing an implementation-specific hack.


> 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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2088) Passing initial mode from command line

Posted by "David Marston (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2088?page=comments#action_61831 ]
     
David Marston commented on XALANJ-2088:
---------------------------------------

That's an interesting interpretation of the spec.
I'm going to send a question in to the Working Group,
quoting your report, to see if they want to clarify
this when they get around to doing more XSLT 1.0
errata.

> 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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2088) Passing initial mode from command line

Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2088?page=comments#action_62209 ]
     
Brian Minchau commented on XALANJ-2088:
---------------------------------------

This is not prohibited by the XSLT 1.0 recommendation. Per the Xalan-J JIRA meeting on April 5, 2005, Xalan is accepting this one as a JIRA "Improvement" request. Can't say if or when this would be done, but it should be open for consideration.

There is a workaround.

> 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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2088) Passing initial mode from command line

Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANJ-2088?page=comments#action_12315527 ] 

Brian Minchau commented on XALANJ-2088:
---------------------------------------

Mukul,
at this point it seem unlikely that this feature will make it into the 2.7.0 release. Various Xalan-J committers think it is a good idea, but nobody seems to have the time.

> 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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2088) Passing initial mode from command line

Posted by "Mukul Gandhi (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANJ-2088?page=comments#action_12315531 ] 

Mukul Gandhi commented on XALANJ-2088:
--------------------------------------

No problems.. I am happy that my suggestion was considered significant.

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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org