xsl-list
[Top] [All Lists]

Re: [xsl] Re: XSLT 3.0: What is the default visibility of a package component inside the declaring package ?

2014-11-03 11:06:34

The visibility depends on both the visibility attribute of the component, and
the rules in the package's xsl:expose declarations. If neither apply, the
default visibility is private.


It is worth noting that a late change to the latest public last call working 
draft removed the @visibility attribute from global xsl:param declarations[1]. 
The implicit visibility of xsl:param inside a library package (which is defined 
as the used package) is public, and you cannot change it. This makes sense, as 
params can always be set from the infrastructure (i.e., on the commandline) and 
should therefore be public.

However, if the xsl:param is declared static (a new XSLT 3.0 feature which 
allows use of variables and params inside static expressions and shadow 
attributes, a powerful pre-compilation feature), its implicit visibility is 
local only. Static params cannot be scoped beyond the package or stylesheet 
they are declared in (but import precedence does apply). This also makes sense, 
as it allows for precompilation of packages.

A global xsl:variable can be overridden and has a visibility attribute, but 
only if it is not static.

Cheers,

Abel Braaksma
Exselt, a streaming XSLT 3.0 processor
http://exselt.net

[1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=26740, public bug, comment#3
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>