[Typo3-dev] Writing a DTD for T3DataStructure simply not possible

Sven Wilhelm wilhelm at icecrash.com
Tue Feb 15 16:37:07 CET 2005


Hi,

I'm working with TV on some definded projects.
During this work I had the wish for a DTD or Schema for T3DataStructure, 
because with such one it would be possible to easily generate such a 
structure with an external DTD-aware XML-Editor.

Also Kasper asked in one of the Docs of the Documentation area that one 
could write such an DTD.

After analysing a little bit the T3DataStructure I say that it is simply 
not possible to write a DTD because of the dynamic use of element names.

An example is the use of field_xxx for element names. If you have 20 
Structures you can believe that you need 20 DTD to be valid this way.
This is an example where an element name was choosen where an attribute 
is definitly the right thing.

One way for optimization would be something like an RFC for the 
T3DataStructure.

* Where do you want to use the structure?
* What elements do you think you need for that (could be possible an
   oo-model that will be transfered to a DTD)?
   The oo-model has the sence that the model could be reviewed in several
   step before implementing anything.
* What attributes are necessary for the elements?

Building a DTD from that way and use it in a specified implementation (TV).

-----------------------------------------------
Example snapshot of a T3DataStructure:

             <field_content type="array">
                 <tx_templavoila type="array">
                     <title>Welcome Content Area</title>
                     <description>[Here you can map the 
content]</description>
                     <sample_data type="array">
                         <numIndex index="0">Some content, content, 
content</numIndex>
                     </sample_data>
                     <eType>ce</eType>
                     <TypoScript>
	10= RECORDS
	10.source.current=1
	10.tables = tt_content
							</TypoScript>
                 </tx_templavoila>
                 <TCEforms type="array">
                     <config type="array">
                         <type>group</type>
                         <internal_type>db</internal_type>
                         <allowed>tt_content</allowed>
                         <size>5</size>
                         <maxitems>200</maxitems>
                         <minitems>0</minitems>
                         <multiple>1</multiple>
                         <show_thumbs>1</show_thumbs>
                     </config>
                     <label>Welcome Content Area</label>
                 </TCEforms>
             </field_content>
            <field_news_latest type="array">
            .
            .
            .
             </field_news_latest>
-----------------------------------------------

Greets Sven




More information about the TYPO3-dev mailing list