[Typo3-dev] Validating TypoScript - Schema vs. DTD
Elmar Hinz
elmar.DOT.hinz at team.MINUS.red.DOT.net
Tue Nov 29 18:36:37 CET 2005
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
--
Climate change 2005: Mexico, Guatemala, New Orleans, Sahel, Bangladesh,
Spain, Portugal, Austria, Swiss, France, ...
Production of CO2 is killing people.
Production of CO2 just for fun is killing people just for fun.
More information about the TYPO3-dev
mailing list