Re: Optional attributes in instance.

Chiba doesn't deal at all well with attributes that may or may not 
exist.
if you bind something to an attribute and its not there Chiba will 
complain loudly.
it doesn't implement the whole lazy authoring thing in this case.
(at least it didn't in v1.0, maybe they've fixed that now?)
I found a workaround but it was messy and involved serverside xsl to
restore missing attributes & elements with dummy's just so that the xform
would remain functional during multiple submission/instance reload cycles
where relevant="false" would cull my instance data which could not then be
reloaded directly. this whole aspect of xforms really needs to be
addressed. There are issues here. A particularly nasty side effect of
submiting data whilst you might be using relevant to hide aspects of the
UI actually culls your data - not always ideal!

Regards
Jason.





Date sent:      	Fri, 10 Jun 2005 14:26:12 +0400
From:           	Alexander Berezhnoy <alexander.berezhnoy@splc.ru>
To:             	www-forms@w3.org
Subject:        	Optional attributes in instance.
Forwarded by:   	www-forms@w3.org
Date forwarded: 	Fri, 10 Jun 2005 10:56:02 +0000

> 
> Hi,
> I've the following question:
> 
> For example, I have an instance like
> <person name="Ivan Ivanoff"/> and also "@age" which is the optional
> attribute of a <person> tag. I need to have an input element which is
> bound to person/@age and have some default value if the attribute is
> omitted in instance. My XForms engine (Chiba) ignores my <input> tag
> unless the @age is actually present (it just doesn't show the html
> input, but shows it's label). Is it possible to do so?
> 
> Thank you.
> 
> -- 
> Alexander Berezhnoy,
> Chief Architect
> SmartPhone Labs, LLC
> http://www.smartphonelabs.com
> 
> 
> 

Received on Friday, 10 June 2005 14:07:23 UTC