Subject: [xsl] implements-prefix vs implements-namespace From: "Clark C. Evans" <cce@xxxxxxxxxxxxxx> Date: Mon, 5 Mar 2001 16:42:04 -0500 (EST) |
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@xxxxxxxxx> 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xbind:module == xsl:scrip, David Carlisle | Thread | [xsl] Re: implements-prefix vs impl, David Carlisle |
RE: [xsl] [exsl] EXSLT 1.0 - Common, Kevin Jones | Date | Re: [xsl] XSL,Javascript, NS 4.x, Michael Beddow |
Month |