gtktalog-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gtktalog-devel] XML DTD : Request for review / comment


From: Yves Mettier
Subject: Re: [Gtktalog-devel] XML DTD : Request for review / comment
Date: Tue, 16 Sep 2003 20:33:40 +0200 (CEST)
User-agent: SquirrelMail/1.4.1

> Hi all (again me, yep ;)
>
> Seemed that writing an XML DTD wasn't so difficult, so I gave it a try:

Looks good.
Comments inside...

>
> <!DOCTYPE REPORT [
>
>       ELEMENT NAME (#CDATA)
>       ELEMENT LEGEND (#CDATA)
>       ELEMENT GENERATOR (NAME, VERSION, URL, AUTHOR, CONTACT)
>       ATTLIST GENERATOR
        NAME CDATA #REQUIRED
>       VERSION CDATA #REQUIRED

CATALOG_VERSION, not VERSION.
You can add VERSION but #IMPLIED, if you want.

>       URL CDATA #REQUIRED

What is it ?

>       AUTHOR CDATA #IMPLIED
>       CONTACT CDATA #IMPLIED>
>
>       ELEMENT AMOUNT_DISCS (#CDATA)
>
>       ELEMENT AMOUNT_CATEGORIES (#CDATA)

Forget about AMOUNT_*: this can be computed.

>       ELEMENT CATEGORIES (CATEGORY*)
>       ATTLIST CATEGORIES CATEGORY CDATA #IMPLIED

Add some IDs for the categories and the descriptions. Otherwise how will the 
items know
about the categories and descriptions ?

>
>       ELEMENT AMOUNT_DESCRIPTIONS (#CDATA)
>       ELEMENT DESCRIPTIONS (DESCRIPTION*)
>       ATTLIST DESCRIPTIONS DESCRIPTION CDATA #IMPLIED
>
>       ELEMENT REPORT (DISC*,DIRECTORY*)

What is this ?

>       ELEMENT DISC (NAME,DIRS,FILES,VFS,DIRS_VFS,FILES_VFS,MB,DIRECTORY*)
>       ATTLIST DISC
        NAME CDATA #REQUIRED
>       DIRS CDATA #REQUIRED
>       FILES CDATA #REQUIRED
>       VFS CDATA #REQUIRED
>       DIRS_VFS CDATA #REQUIRED
>       FILES_VFS CDATA #REQUIRED
>       MB CDATA #REQUIRED>

What do the attributes mean ?

>
>       ELEMENT DIRECTORY (NAME, FULL_PATH, FILE*)
>       ATTLIST DIRECTORY
        NAME CDATA #REQUIRED
>       FULL_PATH CDATA #REQUIRED>

Missing date, category, description.

>
>       ELEMENT FILE (NAME,SIZE,DATE,CATEGORY,DESCRIPTION,INFORMATION)
>       ATTLIST FILE
        NAME CDATA #REQUIRED
>       SIZE CDATA #REQUIRED
>       DATE CDATA #REQUIRED
>       CATEGORY CDATA #IMPLIED
>       DESCRIPTION CDATA #IMPLIED
>       INFORMATION CDATA #IMPLIED>
> ]>

I think that you should define an item with the following stuff inside:
name
size
date
rights (rwxr-xr-x for example. This would be a new feature)
owner (new feature)
group (new feature)
category
description
info
mime (new feature)

Then find a way for dirs, files, vfs to inherit this item definition.

I'm not a XML warlord, and there are maybe mistakes that I did not find.
I'm not a XML warlord, so I will not tell you the best way to build a tree 
structure
such as the one we need. Of course an XML file is a tree, but is mapping the 
gtktalog
tree structure on a XML tree the best solution ?

About AMOUT_*, this can be computed. The catalog file should only contain the 
necessary
stuff. If you need an export in XML or HTML with more data, XSLT can transform 
XML files
into what you want (the gtktalog web site is made from XML with XSLT). And 
AMOUNT_* can
probably be computed in 2 or 3 lines with XSLT. I will play with that when we 
have XML
catalogs: it can be fun :)


> I added some extra's that seemed important to me (the GENERATOR stuff,
> especially the VERSION tag!).

We will have to make the distinction between necessary data (like <disk>),
optionnal data (like <version>)
and extensions (like <lent_to>: this is a feature request, a very old one; or 
like
<remaining_space>: this is the latest feature request: see the ml archive, 2 or 
3 days
ago)

Yves

-- 
- Homepage    - http://ymettier.free.fr - http://www.logicacmg.com -
- GPG key     - http://ymettier.free.fr/gpg.txt                    -
- Maitretarot - http://www.nongnu.org/maitretarot/                 -
- GTKtalog    - http://www.nongnu.org/gtktalog/                    -






reply via email to

[Prev in Thread] Current Thread [Next in Thread]