xsl-list
[Top] [All Lists]

Re: [xsl] xsl:import and use-when

2014-05-15 19:50:01
Hi,

From: Michael Kay mike(_at_)saxonica(_dot_)com 
[xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com]
Sent: May 15, 2014 6:41 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] xsl:import and use-when


The 2.0 spec says that in the dynamic context for evaluating use-when 
expressions, the set of available documents is empty.

I did try to read that section of the 2.0 spec to see if there was a 
static/dynamic issue that I might have overlooked.   I could not find what you 
are referring to above.

I did find this [1]:

"Any element in the XSLT namespace may have a use-when attribute whose value is 
an XPath expression that can be evaluated statically"

With regard to the doc() function, the 2.0 spec says that it should be stable 
but that can be relaxed by implementations (relaxing seems reasonable in the 
context of the web).  The doc-available() function is defined to return true if 
doc() .would return a document node. 

With regard to statically known available documents [2], the spec says that 
statically known documents [3] in the static context [4] are used to provide 
static type information, not to determine which documents are available.  But 
if a document is statically known, it is potentially available using the doc() 
function, hence I think the use of doc-available() in use-when should be legal, 
although if it isn't it isn't.

Regards,
Peter

[1] http://www.w3.org/TR/xslt20/#conditional-inclusion
[2] http://www.w3.org/TR/xpath20/#dt-available-docs
[3] http://www.w3.org/TR/xpath20/#dt-known-docs
[4] http://www.w3.org/TR/xpath20/#dt-static-context
--~----------------------------------------------------------------
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>