Return-Path: Delivered-To: apmail-cocoon-docs-archive@www.apache.org Received: (qmail 83655 invoked from network); 8 Mar 2005 19:02:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 8 Mar 2005 19:02:29 -0000 Received: (qmail 31932 invoked by uid 500); 8 Mar 2005 19:02:29 -0000 Delivered-To: apmail-cocoon-docs-archive@cocoon.apache.org Received: (qmail 31895 invoked by uid 500); 8 Mar 2005 19:02:29 -0000 Mailing-List: contact docs-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: docs@cocoon.apache.org Delivered-To: mailing list docs@cocoon.apache.org Received: (qmail 31882 invoked by uid 99); 8 Mar 2005 19:02:28 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 08 Mar 2005 11:02:27 -0800 Received: (qmail 83626 invoked from network); 8 Mar 2005 19:02:26 -0000 Received: from unknown (HELO minotaur.apache.org) (127.0.0.1) by 127.0.0.1 with SMTP; 8 Mar 2005 19:02:26 -0000 Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: docs@cocoon.apache.org To: docs@cocoon.apache.org Subject: =?iso-8859-1?q?=5BCocoon_Wiki=5D_Updated=3A__WhiteBoardCocoonForms?= Date: Tue, 08 Mar 2005 19:02:26 -0000 Message-ID: <20050308190226.83603.1956@minotaur.apache.org> X-Spam-Rating: 127.0.0.1 1.6.2 0/1000/N X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Date: 2005-03-08T11:02:26 Editor: ReinhardPoetz Wiki: Cocoon Wiki Page: WhiteBoardCocoonForms URL: http://wiki.apache.org/cocoon/WhiteBoardCocoonForms no comment Change Log: ---------------------------------------------------------------------------= --- @@ -22,10 +22,10 @@ All aspects of these features (syntax, implementation, etc.) are subject to discussion and change. = -=3D=3D Macro library support =3D=3D +=3D=3D Macro library and field extensions support =3D=3D *Define - Creates a reusable macro definition. *Expand - Creates an instance of a macro definition. - *Macros - Defines a reusable macro library. + *Library - Defines a reusable macro library. *Import - Brings a macro library into scope. = The syntax and examples below are written assuming use of @@ -33,7 +33,7 @@ also present for the form binding and the form template, using the respective name spaces. = -=3D=3D=3D Define =3D=3D=3D +=3D=3D=3D Define a macro =3D=3D=3D Creates a reusable macro definition. {{{ Syntax: @@ -80,22 +80,23 @@ }}} = =3D=3D=3D Macros =3D=3D=3D -Defines a reusable macro library. +Defines a reusable library. = {{{ Syntax: = - + - + + = Note: = - The "fd:macros" element must be the root of the document. + The "fd:library" element must be the root of the document and contains m= acros and fields. = Example: = - + Name @@ -106,11 +107,29 @@ - + + + email + + + + + + + + customer number + + + + + + = + + }}} = -=3D=3D=3D Import =3D=3D=3D -Brings a macro library into scope. +=3D=3D=3D Import (using the library's elements) =3D=3D=3D +Bring library elements into scope. {{{ Syntax: = @@ -118,8 +137,15 @@ = Example: = - - + + + + customer's email + + + + + = Effective result: = @@ -131,6 +157,23 @@ Price + + + customer's email + + + + + + + + customer number + + + = + + + }}} = The "prefix" is a user-defined string used when expanding @@ -139,6 +182,8 @@ = The "uri" identifies the source for the macro library. Any protocol understood by Cocoon may be used. + +Note that single fields don't need to be defined within an {{{fd:macro}}} = element. This (global) definitions can be reused in the custom form definit= ion using the {{{extends}}} attribut. = =3D=3D=3D Additional Notes =3D=3D=3D =20