You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by lechael <le...@hotmail.com> on 2004/05/01 00:13:35 UTC

Re: Silly Question NO7: load data from a file of wd: namespace?

> > first create a form from a form definition===> binding it===> load data
to it from  a file  ===>invoke a pipeline to show this form by a template
as to my understanding,
wd: is like "class" and wt: is like "object".
here this file is to load data, so it is more like "object"
isn't it??

and also, in this sample, it seems that in all those wb:XXXX markup is
defined in the first step, which overwrote those markup defined in
xmlns:wd="http://apache.org/cocoon/woody/definition/1.0"


for example: in the following code, <wd:booleanfield
id="samp-struct-booleanfield"><wd:label>Sample Struct
BooleanField</wd:label></wd:booleanfield>
                                                     ^^^^^^^^^^^^^^ is
defined in  form_model_gui_model :  <wd:struct id="booleanfield"> except
that it overwrite he old label "BooleanField" to a new one "Sample Struct
BooleanField". am I right??????????????


================== codes from form_model_gui_model:(form defnition file in
step one)========================
 <wd:struct id="booleanfield">
              <wd:label>BooleanField</wd:label>
              <wd:widgets>
                <wd:new id="id-class"/>
                <wd:new id="label-class"/>
              </wd:widgets>
            </wd:struct>
            <wd:struct id="field">
              <wd:label>Field</wd:label>
              <wd:widgets>
                <wd:new id="id-class"/>
                <wd:new id="label-class"/>
                <wd:new id="required-class"/>
              </wd:widgets>
            </wd:struct>

================code from form_model_gui_data (data file in step
three)=======================================

<wd:struct id="samp-struct">
      <wd:label>Sample Struct</wd:label>
      <wd:widgets>
        <wd:booleanfield id="samp-struct-booleanfield"><wd:label>Sample
Struct BooleanField</wd:label></wd:booleanfield>
        <wd:field id="samp-struct-field" required="true"><wd:label>Sample
Struct Field</wd:label></wd:field>
      </wd:widgets>
    </wd:struct>

----- Original Message -----
From: "Marc Portier" <mp...@outerthought.org>
To: <us...@cocoon.apache.org>
Sent: Thursday, April 29, 2004 11:41 PM
Subject: Re: Silly Question NO7: load data from a file of wd: namespace?


>
>
> lechael wrote:
>
> > in cocoon's inbuilt example:
> > http://localhost/samples/woody/form_model_gui.flow
> > first create a form===> binding it===> load data to it from  a file
> > ===>invoke a pipeline to show this form by a template
> > following is some code extracted from the data file,
> > 1.  it use namepace of wd: !! why???????
> >
>
> how do you mean, why?
> why not?
>
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <wd:form  xmlns:wd="http://apache.org/cocoon/woody/definition/1.0"
> > xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
> >   <wd:widgets>
> >
>
> the process that is interpreting these definition files will only look
> for elements in this namespace.
>
> (for completeness, wd is not the namespace, but the local profix)
>
> -marc=
> --
> Marc Portier                            http://outerthought.org/
> Outerthought - Open Source, Java & XML Competence Support Center
> Read my weblog at                http://blogs.cocoondev.org/mpo/
> mpo@outerthought.org                              mpo@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Silly Question NO7: load data from a file of wd: namespace?

Posted by Marc Portier <mp...@outerthought.org>.

lechael wrote:

>>>first create a form from a form definition===> binding it===> load data
> 
> to it from  a file  ===>invoke a pipeline to show this form by a template
> as to my understanding,
> wd: is like "class" and wt: is like "object".

actually wi: is like object, but you never type that
(so you don't see it)

wt: really is just a template to be translated into wi:

> here this file is to load data, so it is more like "object"
> isn't it??
> 

I don't get it, you show samples of definition files, no?

pls, don't be confused by the meta-approach of the forms-gui-sample
it is an attempt to built a html based gui for editing an XML file that 
has recursive structures.

it uses (by accident) the own woody form defition files as a sample to that.

actually it's no accident: the underlaying dream is that we could use 
cocoon itself for graphically editing the form defintion files (hence 
the meta-loop)

pls look at some more straightforward samples first, it's really not the 
best one to start with!

and again: the complete syntax found there will go away and be replaced.

regards,
-marc=
-- 
Marc Portier                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                http://blogs.cocoondev.org/mpo/
mpo@outerthought.org                              mpo@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org