[Bug 3387] Editorial, FODC0005 is used by both fn:doc() and fn:doc-available(), but only specified for fn:doc().

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3387

           Summary: Editorial, FODC0005 is used by both fn:doc() and fn:doc-
                    available(), but only specified for fn:doc().
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Keywords: editorial
          Severity: normal
          Priority: P2
         Component: Functions and Operators
        AssignedTo: ashok.malhotra@oracle.com
        ReportedBy: frans.englich@telia.com
         QAContact: public-qt-comments@w3.org


The description for FODC0005 reads:

err:FODC0005, Invalid argument to fn:doc.

However, FODC0005 is also used in fn:doc-available(). Here's the cases it's
used:

fn:doc(): If $uri is not a valid xs:anyURI, an error is raised [err:FODC0005].

fn:doc(): If the Available documents provides no mapping for the string, an
error is raised [err:FODC0005]

fn:doc-available(): If $uri is not a valid xs:anyURI, an error is raised
[err:FODC0005].


Possible solutions:
* Change the description for FODC0005 to "Invalid argument to fn:doc or
fn:doc-available". I think this is the least intrusive change, and aligns with
what currently is specified.
* Allocate a new error code for fn:doc-available(). If detailed error codes are
of interest, this is probably an appealing alternative.

I have no preference, I can understand both. Conservatism is understandable,
but on the other hand it's neither that intrusive to allocate a new error code.


Frans

Received on Saturday, 24 June 2006 11:23:56 UTC