This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Section 9.1 states the rule: The visibility attribute must not be specified for a local variable and follows this with the clarification: that is, it is allowed only when the parent element is xsl:stylesheet, xsl:transform, or xsl:override. The clarification is not quite accurate. It should say: that is, it is allowed only when the parent element is xsl:package, xsl:stylesheet, xsl:transform, or xsl:override.
The WG agreed the change and it has been applied to the spec.