cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stev...@outerthought.org
Subject [WIKI-UPDATE] WoodyFileFormats Fri Aug 1 18:00:02 2003
Date Fri, 01 Aug 2003 16:00:02 GMT
Page: http://wiki.cocoondev.org/Wiki.jsp?page=WoodyFileFormats , version: 1 on Fri Aug  1 15:53:30
2003 by SylvainWallez

New page created:
+ The [long discussion|http://marc.theaimsgroup.com/?t=105942333100005&r=1&w=2] about
Woody led to restructure its current file formats and content (as of 2003-08-01)
+ 
+ The following files have been identified :
+ * format dictionary (new), containing converter declarations for the base types declared
in cocoon.xconf
+ * data dictionary (new), containing only datatypes deriving from the base types declared
in cocoon.xconf
+ * form definition, defining widgets
+ * form template, instanciating widget definitions in a page layout
+ 
+ Previously, one namespace was used for one file, but the discussion showed that namespaces
actually represent the different Woody concerns, and that each file contained element of several
concerns and as such could mix namespaces.
+ 
+ The namespaces currently identified are :
+ * Definition : http://apache.org/cocoon/woody/definition/1.0
+ * Template : http://apache.org/cocoon/woody/template/1.0
+ * Instance : http://apache.org/cocoon/woody/instance/1.0
+ 
+ !!! Format dictionary
+ 
+ {{{
+ <wd:formats xmlns:wd="http://apache.org/cocoon/woody/definition/1.0">
+ 
+   <wd:format id="xml-date" basetype="date" converter="formatting">
+     <!-- converter-specific configuration -->
+     <patterns>
+       <pattern>yyyy-MM-dd</pattern>
+     </patterns>
+   </wd:format>
+   
+   <!-- "converter" unspecified, so default converter for "decimal" is used -->
+   <wd:format id="price" basetype="decimal" variant="number">
+     <patterns>
+       <pattern>#.00</wd:pattern>
+     </patterns>
+   </wd:format>
+   
+ </wd:formats>
+ }}}
+ The {{wd:format}} element accepts the following attributes :
+ * {{id}} : the format identifier, must be unique
+ * {{basetype}} : the base type on which the format applies. This is used to get the appropriate
converter.
+ * {{converter}} : the converter to use. If not specified, the default converter for the
base type is used.
+ * any other converter-specific attribute, e.g. {{variant}} in the above example.
+ 
+ ''Open items :
+ * I changed {{wd:convertor}} to {{wd:format}}, as a "converter" can convert from a class
to another while "format" is more explicit about the fact that one the two classes is {{String}}
(see also java.text.Format)
+ * The contents of {{wd:format}} being converter-specific, it's not in the "wd:" namespace
(mimics the configurations in {{map:components}})''
+ 
+ 
+ !!! Datatype dictionary
+ {{{
+ }}}
+ 
+ !!! Form definition file
+ {{{
+ }}}
+ 
+ !!! Form template
+ {{{
+ }}}
+ 
+ !!! Form instance
+ {{{
+ }}}
+ 



Mime
View raw message