[Tellico-users] Tellico-DTD and XML-Documentation

Alexander Fischer alexanderfischer at o2online.de
Thu Oct 15 23:21:15 UTC 2009


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!

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. Now i need some advice and have some  
suggestions and thoughts. I have really no idea how work intensive and  
useful they are. I like your work really and appreciate comments.


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]


What does the field element attributes flags, format and type and there  
specific values stand for? The attribute definitions are only CDATA. Is  
this correct? I only found small numbers. Is it worth the try to write a  
more specific xml schema or are the definitions changing that fast?  
Defining stuff like urls and numbers would be a nice thing.


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?

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?

Going this way a step forward, it should be possible to shrink and  
modularize the tellico.dtd a lot, because the specific entry definitions  
of the specific collections would be no more present in the core dtd.

<?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'[

   <!ENTITY % collection PUBLIC '-//Robby Stephenson/DTD Tellico  
Extension//EN' 'path/to/bookCollection.dtd'>
   %collection;

]>
<tellico xmlns="http://periapsis.org/tellico/" syntaxVersion="11" />

And the bookCollection.dtd would include the entry element and subelement  
definitions.
<!ELEMENT entry (bookElement1, bookElement2)>
<!ELEMENT bookElement1 (#PCDATA)>
<!ELEMENT bookElement2 (#PCDATA)>

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.


That's it for now ;)


cu alex



More information about the tellico-users mailing list