W3C home > Mailing lists > Public > www-forms@w3.org > July 2001

Re: positional predicates in canonical binding-expressions?

From: T. V. Raman <tvraman@almaden.ibm.com>
Date: Fri, 13 Jul 2001 08:36:02 -0700
Message-ID: <15183.5474.33988.781739@bubbles.almaden.ibm.com>
To: joern turner <joern.turner@web.de>
Cc: tvraman@almaden.ibm.com, www-forms@w3.org
schema is to validate the instance.
The XForms model consists of the instance and schema --
the instance you populate --the schema you use to validate
against after the instance is populated.

Reason I define above here is that 
in general hoping to asemble a rich xml tree by looking at
the binding expressions is likely to be intractable.


>>>>> "joern" == joern turner <joern.turner@web.de> writes:

    joern> Hello, before starting i should state that i'm
    joern> really welcome the work about the
    joern> repeat-element. this solves a contiuous and
    joern> repeating ;) problem especially in web
    joern> form-processing.


    joern> from my understanding of the draft, the structure
    joern> of the instance can be constructed without
    joern> referring to a schema - simply by extracting this
    joern> information out of the binding-expression used in
    joern> the XForms UI. if this is not right, some or all
    joern> of the following may be irrelevant.

    joern> T. V. Raman wrote:

    >> Hi -- you're correct in that there is no way to
    >> reassemble a list of items on the server because of
    >> how WWW form post works today.
    >> 
    >> However there is nothing inside the specification for
    >> repeat that claims we preserve order --perhaps we
    >> should make it even clearer.

    joern> Yes, you're right. That was just an assumption i
    joern> silently made. But, would'nt the user expect to
    joern> get the data back in the order they have been
    joern> inputted? Wouldn't the notion of a 'document
    joern> order' as it is common in XML be destroyed?

    joern> second, -- assuming you have a list of lists in
    joern> your instance-data which you use as initial data
    joern> (presets) or a preloaded instance, it is not
    joern> possible to reconstruct this list in a submit
    joern> without the usage of positional predicates. The
    joern> result (again the example from the draft) would
    joern> simply be:

    joern> <items> <item> <f1>first</f1> <f2>first</fi>
    joern> <f1>second</f1> <f2>second</f2> <f1>third</f1>
    joern> <f2>third</f2> </item> </items>

    joern> which is clearly a different semantic. maybe i'm
    joern> on the wrong track here, but i'm using the
    joern> algorithm which is described for
    joern> instance-initialization: evaluating the binding
    joern> expression from left to right and creating
    joern> appropriate children for each step, if it does
    joern> not exist already.  although the brilliant
    joern> simplicity of that algorithm would get
    joern> complicated by positions, i couldn't think of any
    joern> other way to preserve the input order which i (as
    joern> you might have guessed by now) consider essential
    joern> for the usefullness of repeat. otherwise i would
    joern> urge the application using the XForms processor
    joern> to achieve this some way - which may be
    joern> complicated.


    >> Incidentally I'm surprized you raised this in
    >> connection with repeat --and not selectMany --both
    >> have the same problem --only difference is that
    >> selectMany is populating a schema list --repeat is
    >> populating something with more substructure

    joern> not exactly. - a selectMany (in html e.g. mapped
    joern> to a <select multiple="true" ...) will be send as
    joern> a single parameter: with parameter-name and an
    joern> array of values. The selected values occur in the
    joern> order they're displayed in the list. - at least
    joern> when you're using the serlvet-api to parse
    joern> parameters.

    joern> please excuse my lengthy explanations but as i
    joern> can hardly think of an application which does not
    joern> rely on some kind of 'natural' order, this seems
    joern> to be an important topic to me.


    >>

-- 
Best Regards,
--raman
------------------------------------------------------------

IBM Research: Human Language Technologies
Phone:        1 (408) 927 2608
Fax:        1 (408) 927 3012
Email:        tvraman@us.ibm.com
WWW:      http://www.cs.cornell.edu/home/raman
PGP:          http://emacspeak.sf.net/raman.asc
Snail:        IBM Almaden Research Center,
              650 Harry Road
              San Jose 95120
Received on Friday, 13 July 2001 11:38:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:21:49 GMT