[Home] [By Thread] [By Date] [Recent Entries]
On 2011-04-14 21:47, G. Ken Holman wrote:
At 2011-04-14 20:40 +0100, Andrew Welch wrote:> Remember that mode names can be namespace qualified. When I create XSLT > stylesheet libraries, I use two namespaces for the name of the modes engaged > therein: a public one that my library users are allowed to use (to exploit > the library), and a private one that my library users are expressly told not > to use (so as not to inadvertently interfere with the operation of the > library). That's a real "pro tip" (as @ndw would put it), Ken! Haven't thought about using namespaced modes. I sometimes provided library functions (namespace-qualified, as demanded by the spec) which applied internal templates *in unqualified modes*. And I was always afraid that people would accidentally use the same unqualified mode name for their own templates, thus overwriting my rules. It's good to distinguish between API namespace (the one that the publicly available function, or named template, or variable, or key, is in) and internal namespace. This is actually a good use case for justifying the much-contested XML namespaces. Gerrit
|

Cart



