[Bug 9734] default initial template

https://www.w3.org/Bugs/Public/show_bug.cgi?id=9734

Abel Braaksma <abel.braaksma@xs4all.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |abel.braaksma@xs4all.nl

--- Comment #5 from Abel Braaksma <abel.braaksma@xs4all.nl> 2012-06-28 16:19:27 UTC ---
If we use xsl:main, I'd expect it to be x:main, xslt:main or likewise depending
on the chosen namespace prefix for the XSL namespace.

If we use main there's the potential for conflicts, maybe not in the main
stylesheet, but in imported/included stylesheets.

If we use #main (my original preference), MK mentioned "we only use tokens like
#all where we need to use a value that isn't a name."

I'd prefer #main because it's distinguishable and in line with #all, #default
etc. Who knows, maybe in a next version someone comes up with #last for a
template that must be called at the end of the transformation. If so, we'll be
glad that we chose either a QName or an octothorp-prefixed name.

I understand the reluctance for using the octothorp version, but consider:

<xsl:template mode="#all">...
<xsl:apply-templates mode="#current">...
<xsl:apply-templates name="#main">

It simply is more clear, imho, and fits existing naming.

(breaking off because discussion is now)

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 28 June 2012 16:19:39 UTC