W3C home > Mailing lists > Public > public-forms@w3.org > February 2009

Re: Question about lazy authoring

From: Ulrich Nicolas Lissť <unl@dreamlab.net>
Date: Tue, 17 Feb 2009 21:46:10 +0100
Cc: John Boyer <boyerj@ca.ibm.com>, Erik Bruchez <ebruchez@orbeon.com>, Nick_Van_den_Bleeken@inventivegroup.com, Forms WG <public-forms@w3.org>
Message-Id: <1F03BC2B-7FCA-435C-A55B-93AB9FC410D3@dreamlab.net>
To: Mark Birbeck <mark.birbeck@webbackplane.com>
All,

since there was no instance in the test I can clearly see the  
connection to lazy authoring. Admitted, the purpose of the test was  
checking the IDREF mechanism as John pointed out. But Nick hit an  
interesting edge case I think. Wouldn't it be a good fit to have  
automatic instance data creation happen upon /any/ XPath expression in  
the UI in case no instance existed before?

The 4.2.2 The xforms-model-construct-done Event default action [1]  
defines that "for the first reference to an instance a default  
instance is created..." and "A root instanceData element is created.".  
Couldn't this be expanded to any XPath expression occurring in the UI,  
like xf:output/@value? This would have the same effect like Erik  
described for XProc, because the root instanceData element would serve  
as evaluation context.

Regards,
Uli.

[1] http://www.w3.org/TR/xforms11/#evt-modelConstructDone

On 17.02.2009, at 20:42, Mark Birbeck wrote:
> Hi John,
>
> Although Nick's subject line mentions lazy authoring, I read the
> substance of his post to be that you cannot evaluate an XPath
> expression unless there is an evaluation context. So either this test
> must fail, or we have to work out how to create a default instance. (I
> guess that's where Nick drew the connection with lazy authoring.)
>
> So if Erik's suggestion is held over to XForms 2.0 as you suggest,
> isn't the answer to Nick's question that the test must be rewritten to
> ensure that there is a context of some description? Otherwise,
> although it is only a simple call to index(), it cannot be guaranteed
> to 'fail consistently' in all implementations.
>
> Regards,
>
> Mark
>
> On Tue, Feb 17, 2009 at 6:56 AM, John Boyer <boyerj@ca.ibm.com> wrote:
>>
>> Hi Nick,
>>
>> Why is this a question about lazy authoring?
>> The test you identified is testing the IDREF mechanism.  It is not  
>> intended
>> to test of lazy authoring, so it is a bad test because it will run  
>> afoul of
>> a lazy authoring problem before getting to the issue it claims to  
>> test,
>> which is whether the index function returns NaN when it can't find  
>> the
>> identified repeat.
>>
>> Erik's point about amending the eval context of an xpath when their  
>> is no
>> context node would make a good feature/suggestion+test for Section  
>> 7.2,
>> except it is probably better for XForms 2.0 because in XForms 1.x  
>> we have
>> Xpath 1.0, which requires a context node as part of the context.  I  
>> suppose
>> we could make do if all current xpath 1.0 implementations allowed  
>> evaluation
>> without a starting context node, but this is probably not an issue  
>> we have
>> to spend a lot of cycles on right now.
>>
>> For lazy authoring, I think you need at least one real UI binding  
>> to be
>> expressed because otherwise the lazy authored instance will be  
>> empty, which
>> is not allowed.  If you squint at the spec in just the right way,  
>> you can
>> see it producing the same kind of exception as if you had put this  
>> into the
>> model:
>>
>> <instance/>
>>
>> Cheers,
>> John M. Boyer, Ph.D.
>> STSM, Interactive Documents and Web 2.0 Applications
>> Chair, W3C Forms Working Group
>> Workplace, Portal and Collaboration Software
>> IBM Victoria Software Lab
>> E-Mail: boyerj@ca.ibm.com
>>
>> Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer
>> Blog RSS feed:
>> http://www.ibm.com/developerworks/blogs/rss/JohnBoyer?flavor=rssdw
>>
>>
>>
>>
>> From: Erik Bruchez <ebruchez@orbeon.com>
>> To: Forms WG <public-forms@w3.org>
>> Date: 02/16/2009 01:08 PM
>> Subject: Re: Question about lazy authoring
>> ________________________________
>>
>>
>> XProc solves this issue by saying the following [1]:
>>
>>  "If there is no binding and there is no default readable port then
>> the context node is an empty document node."
>>
>> Something like this would make sense to me for XForms, but it would
>> have to be added to the spec.
>>
>> -Erik
>>
>> [1] http://www.w3.org/TR/xproc/#xpath10-processors
>>
>> On Feb 16, 2009, at 1:32 AM, Nick Van den Bleeken wrote:
>>
>>> All,
>>>
>>> Test case 4.7.c has no instance and no controls that have a node set
>>> binding, but it has a value attribute on an output control is this
>>> supposed to work?
>>>
>>> In my opinion you can't construct an XPath context because you don't
>>> have an instance, because no form controls refer to an instance... I
>>> can work around this and create an instance when there is a form
>>> control that has a value attribute, but this isn't correct to how I
>>> read the spec.
>>>
>>> What are your opinions about this?
>>>
>>> Regards,
>>>
>>> Nick Van den Bleeken
>>>
>>> Inventive Designers' Email Disclaimer:
>>> http://www.inventivedesigners.com/email-disclaimer
>>>
>>> --
>>> This message has been scanned for viruses and
>>> dangerous content, and is believed to be clean.
>>> --
>>>
>>
>> --
>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>> http://www.orbeon.com/
>>
>>
>>
>>
>>
>
>
>
> -- 
> Mark Birbeck, webBackplane
>
> mark.birbeck@webBackplane.com
>
> http://webBackplane.com/mark-birbeck
>
> webBackplane is a trading name of Backplane Ltd. (company number
> 05972288, registered office: 2nd Floor, 69/85 Tabernacle Street,
> London, EC2A 4RR)
>

--
Ulrich Nicolas Lissť
Received on Tuesday, 17 February 2009 20:46:55 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 October 2013 22:06:50 UTC