W3C home > Mailing lists > Public > www-forms@w3.org > October 2005

Which is better multiple models or multiple instances

From: Flinton Adam <Adam.Flinton@cfh.nhs.uk>
Date: Thu, 13 Oct 2005 10:20:49 +0100
Message-ID: <595299DD7F30014BBCE48B93DCB6065203150A73@EXCHAQ2.nhsia.nhs.uk>
To: <www-forms@w3.org>

Dear All,

I am still quietly producing this load from file Xform. I have decided
to try & do it as a template such that others can use it & I il post it
here for posting onto the wiki.

I have 2 instances:


XMLFile uses a src=URL to load the default document & a submission to
load the one you want. It is the file/instance you will want to edit in
your form.

FileHandler has a default structure which in essence contains a Data
element with one child of CurrentFile & possibly many file elements
(which will be used to poplate a drop down choice box to allow you to go
back to "recent documents". 

So far so good.

The problem is that AFAICS you can have multiple models & each model can
contain multiple instances. I will be using the instance() function e.g.
in :

<xf:upload ref="instance('internal')//CurrentFile@filename">

from both instances (e.g. the file open stuff will put the value there &
then call a submission n the XMLFile instance to load it etc).

I can not seem to find a model() function so I am wondering how if I
were to place the 2 into separate models I could access them from the
other in a similar way.

I am also wondering if there s some sort fo best practice wrt many
instances or many models.



This e-mail is confidential and privileged. If you are not the intended recipient please accept our apologies; please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Please inform us that this message has gone astray before deleting it. Thank you for your co-operation.
Received on Thursday, 13 October 2005 09:19:12 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:16 UTC