Micah,

> In my Examploforms framework [1], it's easy to define datatypes like
> string-20, which is an xs:string limited to a maxLength of 20. Actually
> defining these takes some schema markup, like <xs:simpleType>. The
> stylesheet included with Examploforms generates the needed markup in an
> <xs:schema> element inside <xhtml:head>.
>
> What am I doing wrong that this doesn't work in Orbeon? Where is the
> place that the new datatypes should be defined? I searched the examples
> but didn't find any good examples of how to do this.

I understand from this that you are putting an XForms model within an
XHTML head element. This is not supported currently: your model has to
be separate, and declared in the Page Flow as the XForms model in use
for that page.

This of course raises the following interesting question:

On page submit, we reconstruct the submitted XForms instance entirely,
which is good, but we depend on the declaration of the XForms model in
the Page Flow to process model elements such as xforms:bind. If the
model gets declared in the XHTML, this won't work.

Before we even talk about a submit, the MVC architecture followed to
generate a page is: XForms Instance -> Page Model -> Page View. If we
wish to access an XForms model and instance declared in the view, this
architecture either becomes:

1. Harder to implement, i.e. if the view is static XHTML, then we have
   to extract the model from there (which is doable).

2. Close from impossible, i.e. if the view is XSLT, then we need to
   run the view before we actually run the model, as the model
   expects to access an XForms instance.

We could support embedding XForms models in page views only in certain
circumstances (static XHTML), or we could determine that if an XForms
model is embedded in XHTML, it supercedes an XForms model declared in
the Page Flow. The processing would be:

Run view -> XForms engine detects embedded model -> XForms engine
processes model / instance as per spec.

Now this breaks the page model, which was expecting access to an
XForms instance, with default values filled-in, etc.

Thoughts?

-Erik



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
orbeon-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/orbeon-user

Reply via email to