[Typo3-dev] Validating TypoScript - Schema vs. DTD

Peter Russ peter.russ at 4many.net
Tue Nov 29 20:54:45 CET 2005


Elmar Hinz wrote:

> Hello,
> 
> a month ago we had a discussion about the future of TypoScript. We came 
> to the point that it is important to validate it. Without validation we 
> get less error messages about wrong compositions. That slowes down 
> production. This slowdown is compensed by a very short form of notation 
> in comparism to XML. But we don't feel really lucky without the 
> possibility of validation. A lot of TYPO3 users would prefer XML.
> 
> Validation is an important point. But the discussion came to no real 
> result if validation of TypoScript could be possible. I guess the reason 
> for this is that only few of us really know how validation works.
> 
> I currently make some thoughts about converting TS to XML and to 
> validate that.
> 
> 
> page = PAGE
> page.10 = HTML
> page.10.value = Test
> page.10.if.value = 1
> page.10.if.equals = 2
> page.20 = COA
> page.20.10 = HTML
> page.20.10.value = Test
> 
> ...
> 
> <page type="PAGE">
>   <10 type="HTML">
>     <value>Test</value>
>     <if>
>       <value>2</value>
>       <equals>1</equals>
>     </if>
>   </10>
>   <20 type="COA">
>     <10 type="HTML">
>       <value>Test</value>
>     </10>
>   </20>
> </page>
> 
> I don't know if numbers are valid XML Elements. But one could write 
> <number10> instead of <10>. That isn't the point.
> 
> I see a problem with ambiguus elements like "value" or "number10". 
> Depending on their context they are of different Types. That means that 
> depending on their own parents different childs are allowed.
> 
> My knowladge about DTD tells my, that is not possible to define 
> different childs for an element depending on the parent context.
> 
> Does anybody know if schema do offer something like this?
> 
> Regards
> 
> Elmar
Anything you want to know to make things clear about XML and Schema can 
be found at www.w3c.org.

The point I see is that developing the schemata is a vaste of time, 
resources and efforts. Is JAVA that popular because it can be validated? 
Or are there more "coders" for BASIC in the world ;-)

Debugging TS is not that complicate. It just takes some time of 
experience. And depends on how the code is developed ;-)

On the oneside hand I see the possible benefit to "validate" the TS code 
on the otherside I see limitation. Defining a schemata would requirer to 
develop TYPO X from the scratch. How will sponsor it without no real output?

Regs. Peter.





-- 
_____________________________
4Many® Services
openBC: http://www.openbc.com/go/invuid/Peter_Russ




More information about the TYPO3-dev mailing list