W3C home > Mailing lists > Public > public-xformsusers@w3.org > February 2016

ACTION-2053 - Work out how to replace link-exception

From: Erik Bruchez <erik@bruchez.org>
Date: Tue, 23 Feb 2016 21:51:41 -0800
Message-ID: <CAAc0PEVwLsPVXhJDepPrBPqGqLayr5hJZQ_mPtWsg1Yf=eGbfA@mail.gmail.com>
To: "public-xformsusers@w3.org" <public-xformsusers@w3.org>
All,

It doesn't seem too hard. We create an xforms-link-error event, which, like
xforms-version-error, defaults to halting processing but is cancelable.

If processing continues because the event is caught and canceled, we need
to decide what to do with the following:

1. instance() function for instances which didn't load.
2. Access to XPath data model of instances which didn't load.
3. Handling of types associated with schemas which didn't load.

For #1, the solution is simple: do as in the cases where the function does
not refer to an existing instance:

    "In all other cases, an empty sequence is returned." [1]

For #2, since we typically use XPath 2 which works on the XQuery 1.0 and
XPath 2.0 Data Model (XDM), we could rely on the fact that an empty
document is allowed:

    "This data model is more permissive: a Document Node may be empty," [3]

For #3, a simple solution is to do the same as when a type cannot be found,
namely:

    "If the datatype cannot be obtained as just described, then the Default
Value of xs:string is used." [2].

-Erik

[1]
https://www.w3.org/community/xformsusers/wiki/XPath_Expressions_Module#The_instance.28.29_Function
[2]
https://www.w3.org/community/xformsusers/wiki/XForms_2.0#The_type_Property
[3] https://www.w3.org/TR/xpath-datamodel/#DocumentNode
Received on Wednesday, 24 February 2016 05:52:29 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 24 February 2016 05:52:29 UTC