[Bug 30179] Ambiguity concerning references to the context item from a "global variable in a library package"

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

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

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

--- Comment #2 from Abel Braaksma <abel.braaksma@xs4all.nl> ---
In section 3.5.6 it says:

   « The global context item is available only within the top-level package. If
   a valid xsl:global-context-item declaration appears within a library 
   package, then it is ignored, unless it specifies use="required", in which 
   case an error is signaled: [see ERR XTTE0590].»

I think that answers the question you're asking, but it would probably be
better to either repeat this statement, or to link to it from 5.3.3.1.

Note that this doesn't forbid creating an abstract variable that can be
overridden with a new variable that accesses the global context item.

All in all, I think these rules make sense:

* If a library package could access the global context item, it should be able
to declare that wish

* But one library package with <xsl:global-context-item use="required" /> and
one with <xsl:global-context-item use="prohibited" /> creates an unresolvable
conflict. 

So:

* global xsl:variable etc that can access the context item can only do so if
that package becomes the top level package

* the xsl:global-context-item declaration can be used in a library, but will be
ignored (I think it would have been better if it would always raise an error).

In light of this, I think this is confusion in the same section:

    « A type error is signaled if there is a package with an
xsl:global-context-
    item declaration specifying a required type that does not match the
supplied 
    global context item. The error code is the same as for xsl:param: [see ERR 
    XTTE0590].»

We should replace "a package" with "a top level package" (the global context
item declaration is said to be ignored otherwise, and this statement seems to
contradict that).

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Monday, 11 September 2017 14:23:23 UTC