|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
[Tellico-users] Tellico-DTD and XML-DocumentationHello (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 _______________________________________________ tellico-users mailing list tellico-users@... https://mail.kde.org/mailman/listinfo/tellico-users |
|
|
Re: [Tellico-users] Tellico-DTD and XML-DocumentationOn 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 _______________________________________________ tellico-users mailing list tellico-users@... https://mail.kde.org/mailman/listinfo/tellico-users |
| Free embeddable forum powered by Nabble | Forum Help |