This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
implements-prefix vs implements-namespace
- To: xsl-list at lists dot mulberrytech dot com
- Subject: [xsl] implements-prefix vs implements-namespace
- From: "Clark C. Evans" <cce at clarkevans dot com>
- Date: Mon, 5 Mar 2001 16:42:04 -0500 (EST)
- cc: David Carlisle <davidc at nag dot co dot uk>
- Reply-To: xsl-list at lists dot mulberrytech dot com
For those new to the thread, xsl:script has an attribute
called implements-prefix, which informs the xslt processor
that the script is bound to the namespace associated with
the prefix. The problem occurs when importing, i.e., when
the prefix to namespace relationship is not 1-1. In this
currently very rare case, the interaction and behavior
is definately non-obvious. With the intoduction of xsl:script
this case will no longer be rare, and will unfortunately not
get any more obvious. Replacing implements-prefix with
implements-namespace would solve this conceptual problem.
To this thread, David Carlisle <davidc@nag.co.uk> wrote:
> But almost no one has made this objection (on this list) about
> the existing extension-element-prefixes attribute (prior to the current
> thread). This has identical usage, you refer to a namespace by a
> currently bound prefix. Why object to the usage on xsl:script?
1. The "-prefixes" is used in less frequently used
features, like exclude-element. Thus your average
stylesheet writer may not have encountered this
particular construct, nor had to learn about it.
2. Commonly, without the use of import, "namespace" and
"prefix" are most often in 1-1 correspondence. Thus
the stylesheet user, even if they use these uncommon
constructs can be happily ignorant of the distinction.
3. It may be rare when these less than frequently used
features are used in conjunction with import that the
conceptual difficulty emerges.
Currently, almost all stylesheet writers don't use these
less frequently used features having "-prefix" in conjunction
with the import construct.
Therefore, you have not had (any/much) complaining since
the problematic combination is sufficiently rare that
only your serious adventurous xslt programmer would
be using this combination of features.
HOWEVER, with xsl:script and with the desire for modularity,
your _average_ stylesheet user will now be exposed to both
"-prefixes", and they will be using import, so they no longer
be happily ignorant.
I feel this change more than merits a re-consideration of
the "-prefixes" position. It is definately non-trivial
and most xslt users will have the choice of:
a) grappling with the distinction and this less-than-obvious
way of thinking (just to save a few keystrokes); OR
b) don't bother modulizing their stylesheets into
import modules (giving up).
In either case, it's going to become a FAQ. And why on
earth would you want to make a FAQ when one can so easily
be avoided?
Kind Regards,
Clark
P.S. There is one other argument for "namespace" instead
of "prefix", currently one cannot specify prefixes
using XSLT. This will exacerbate the situation unless
this ability is moved into XSLT 1.1 along with xsl:script.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list