This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 9992 - [XSLT 2.0] Error condition for XTSE0165 - what does "conforming to this specification mean"
Summary: [XSLT 2.0] Error condition for XTSE0165 - what does "conforming to this speci...
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 2.0 (show other bugs)
Version: Working drafts
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-23 16:16 UTC by Oliver Hallam
Modified: 2011-06-08 21:22 UTC (History)
0 users

See Also:


Attachments

Description Oliver Hallam 2010-06-23 16:16:46 UTC
XTSE0165 is defined as follows:

[ERR XTSE0165] It is a static error if the processor is not able to retrieve the resource identified by the URI reference, or if the resource that is retrieved does not contain a stylesheet module conforming to this specification.

However, what does it mean by "conforming to this specification"?  If the resource is a valid XML file is that conforming?  What if it has static errors?  What about a module with type errors?  What if it contains dynamic errors that can be detected statically?  The term does not seem to be defined (except for XSLT processors, of which an XSLT module certainly isn't).

I assume the intent was that a resource is conforming if it was a valid XML document and it contains no static errors, otherwise wouldn't the specification say "conforming to the XML specification"?  In this case the expected error code for XSLTS tests impinclerr20_008_01 and impinclerr20_017_01 should be XTSE0165 as they import stylesheets with static errors.

Otherwise should the error code not just state that the stylesheet module is an XML document.
Comment 1 Michael Kay 2010-09-30 17:29:58 UTC
In discussion on the telcon today, the view was that (a) the error definitely all cases where (i) no resource can be retrieved, or (ii) that resource is not well-formed XML. It probably also covers cases where the resource is well-formed XML but is not either an xsl:stylesheet element or a literal result element with an xsl:version attribute, though there might be other errors that could cover this as well. The case where the resource contains static XSLT errors is also an static error, of course, but it's not especially useful to allocate it a separate error code, or indeed to say that it's an error, because one error is good enough to cause the whole thing to fail.

I'm a little disinclined to spend too much time seeking perfection here, but perhaps the text would be improved by simply removing the predicate "conforming to this specification", replying instead on the definition of "stylesheet module" in section 3. (That section fails to say whether a stylesheet module containing errors is in fact a stylesheet module, but this kind of existential debate is rarely productive.)
Comment 2 Michael Kay 2010-11-18 16:52:18 UTC
I propose:

(a) delete "conforming to this specification" from the description of the error code.

9b) add a Note: It is appropriate to use this error code when the resource cannot be retrieved, or when the retrieved resource is not well formed XML. If the resource contains XML than can be parsed but that violates the rules for stylesheet modules, then a more specific error code may be more appropriate.
Comment 3 Michael Kay 2011-03-24 14:36:28 UTC
Proposal in comment #2 was accepted.
Comment 4 Michael Kay 2011-06-08 21:22:58 UTC
I have applied the agreed change.

Oliver, I am closing this as resolved as you will have seen the WG minutes recording this decision. Feel free to reopen if not satisfied.