[TYPO3-dev] Moving the topic of the discussion a little bit -- Based of thread "Change roadmap..."

Dimitri Tarassenko mitka at mitka.us
Wed Apr 12 20:57:49 CEST 2006


Michael,

On 4/12/06, Michael Scharkow <mscharkow at gmx.net> wrote:
> > And why the heck not XML?
> Funny enough that *you* actually asked a few days ago:
[...]
> 2. If the XML gets parsed and then converted into "extensions.bin",
> "reviewstates.bin", etc., why can't we just download these pre-parsed
> files from the repository?"
> So I only say I completely agree with you.

Here is the difference that made me advocate XML for TCA and ask this
question about TER/EM:

With TER and EM we have 2 applications that are _TOTALLY_ under our
control in their input/output formats, both written in PHP and both
written by the same people. The data that is XML-formatted is produced
automatically by one application and consumed by the other. All in
all, I may be missing something but this seems as strange to me as if
say, I would start speaking English with my wife instead of Russian
just because we both can. A developer never needs to add anything to
the XML file with extension description, TER does it, so the XML list
of extensions does not need to be documented.

With TCA you have a thousand of small applications (extensions)
communicating with each other and the core, which no single authority
has control over. TCA is not produced automatically but written
manually by different developers. Because of that, TCA needs to be
documented. Also, TCA is a lot more complex in its structure.

In a nutshell, XML is needed only for a) interoperability b) setting a
common standard for information structure c) being able to verify the
data against this set standard. None of these three reasons are
present in TER-EM communication and all of them are present in TCA.

> Maintaining such a DTD would be completely counterproductive for an
> object that needs to be dynamically extendable. What you can do with XML
> is only the following (and I remember these arguments from earlier
> discussions):
> 1. Check the syntax: Oh, well, PHP *does* actually check the syntax of TCA
> 2. Check the semantics with a DTD or schema: Well, we added property X
> to property Y, so please update your DTD...

For all properties used in the core, you can always ship a new DTD
with the core. For non-core TCA properties that are set and defined by
extensions (I can't actually recall any, can you?) you can always
either specify a separate container with custom extension data that is
not described in main DTD (just CDATA) but validated/parsed/used in
the extensions themselves. Either that, or an extension that defines
and uses new properties in TCA has to supply their definition as DTD
as well, i.e. if you define a new TCA property, you have to do it
EXPLICITLY through DTD versus an implicit definition when you just use
the property name and hope it won't conflict with the neighbors.

> I have not yet seen the advantage of using XML for locallang files,

The only one that I see is UTF over "mix" of national encodings in the
same file, but it's not XML related, so I would agree with you on
that. Again - right tool for the job, and XML for locallang was
definitely an overkill.

--
Dimitri Tarassenko


More information about the TYPO3-dev mailing list