[Tellico-users] Tellico-DTD and XML-Documentation
Robby Stephenson
robby at periapsis.org
Fri Oct 16 04:38:39 UTC 2009
On Thursday 15 October 2009, Alexander Fischer wrote:
> Hello (and sorry for the length of this mail),
>
>
> i recently took a look at Tellico 2.0 and was amazed how good it works as
> a dot zero release. Top developement!
Thanks!
> My starting point was/is, that i am interested in writing an
> xslt-stylesheet, which produces some sql. Because that, i checked the DTD
> and the xml produce by tellico.
Heh, I'm always surprised when anyone ever looks at that. :)
> I have a question in relation to the (new) XML-Definitions from Namespace
> http://periapsis.org/tellico/ (Tellico XML DTD version 11.0). Is there
> some more documentation? What are the meanings of the numbers
> [code line=43]
> <!-- no 5, 9, 11, or 13 -->
> <!ATTLIST field type (1|2|3|4|6|7|8|10|12|14) #REQUIRED>
> [/code]
They're all enum values, (mostly) explained in the handbook..
http://docs.kde.org/development/en/extragear-office/tellico/hacking.html
and following pages...
> Another confusing point is the definition of the entry element. If you
> leave the dtd as it is, tellico produces invalid xml, if you are using a
> custom collection. This does not look pretty well and can lead to
> problems, if an xslt-processor tries to validate the input xml before
> transformation. Is there a reason, why there is a difference between
> custom collections and the predefined collections?
Mostly laziness on my part, I suppose. :) At one stage, I was into being as
technically correct as I could, so I wrote the DTD. I've kept it mostly up
to date, but I never put more thought into making it flexible. You're
correct, custom collections or any collection with a user-defined field
probably fails to validate.
> Maybe it is an idea to extend/modify the dtd processing instruction in
> the xml header slightly, into something like this, if the custom
> collection is defined:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE tellico PUBLIC '-//Robby Stephenson/DTD Tellico V11.0//EN'
> 'http://periapsis.org/tellico/dtd/v11/tellico.dtd'[
> <!ELEMENT customElement1 (#PCDATA)>
> <!ELEMENT customElement2 (#PCDATA)>
> <!ELEMENT entry (customElement1, customElement2)>
> ]>
> <tellico xmlns="http://periapsis.org/tellico/" syntaxVersion="11" />
>
> This should be possible with the definitions from the <field/> tags or am
> i wrong here?
Yeah, that'd probably work. I'd have to figure out how to get the QDom
classes to write that out.
> That way, there would be theoretically a central place where to define
> the specific data definitions which are independent from the core dtd.
> The only connection would be the Entity connectionType. I think this is
> much more flexible because additions can be done more easily and
> validation would be furthermore possible.
All true, I just don't see much value in it. I think you're perhaps the 3rd
person to ask about the DTD in about 5 years... :) No one actually uses it
to validate...
Robby
More information about the tellico-users
mailing list