[prev in list] [next in list] [prev in thread] [next in thread]
List: mozilla-documentation
Subject: Re: DTD
From: Ben Bucksch <mozilla-news () bucksch ! org>
Date: 1999-11-17 2:12:42
[Download RAW message or body]
A correction:
Addititon of
<!ENTITY % boolean "(true|false)">
<!ELEMENT preferences (module+)>
<!ELEMENT module (head, category+, pref+)>
<!-- think of a file, not necessarily a Mozilla module -->
<!ELEMENT head (scope, owner, additionalinfo?)>
<!-- rename, if namespace collision with xhtml -->
<!ELEMENT scope CDATA> <!-- e.g. Component -->
<!ELEMENT owner #PCDATA>
<!ELEMENT additionalinfo &xhtml;>
and change of
<!ELEMENT type
<!ATTLIST type
of (Boolean|Integer|URL|String) #REQUIRED
>
<!ELEMENT option (value, explanation?)>
to
<!ELEMENT type EMPTY>
<!ATTLIST type
of (boolean|integer|url|string) #REQUIRED
limited %boolean; "false"
> <!-- limited: only in the database listed options can be used -->
<!ELEMENT option (value, explanation?)>
<!ATTLIST
default %boolean; "false"
> <!-- default: only one option can have default="true" -->
and <!ENTITY % xhtml #PCDATA> to <!ENTITY % xhtml ANY>
Open issues:
I don't know, how to integrate the XHTML spec into this definition.
Wording of "explanation"
Here is an example for an usage of the DTD:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE greeting SYSTEM
"http://www.mozilla.org/keymaster/gatekeeper/preferences.dtd">
<preferences>
<module>
<head>
<scope>Necko</scope>
<owner>Gagan Saksena<gagan@netscape.com></owner>
</head>
<category id=1>
<explanation>
<name>Network</name>
</explanation>
</category>
<category id=2 parent=1>
<explanation>
<name>Protocols</name>
<description>
Transport methods for data. They access
<html:ul>
<html:li>Inter-/Intranet</html:li>
<html:li>local</html:li>
<html:li>Mozilla-internal</html:li>
</html:ul>
resources.
</description>
</explanation>
</category>
<category id=3 parent=2>
<explanation>
<name>File</name>
</explanation>
</category>
<category id=4 parent=2>
<explanation>
<name>News</name>
</explanation>
</category>
<pref id=1 parent=3>
<key>network.file_sort_method</key>
<explanation>
<name>Sorting</name>
<description>
Controls the order in which files and directories are displayed in
<html:a href="http://www.mozilla.org">Mozilla</html:a> when displaying
directory and/or file indices.
</description>
</explanation>
<type of="integer" limited="true" />
<option default="yes">
<value>0</value>
<explanation>
<name>Alphabetically</name>
<description>
By file name
</desciption>
</explanation>
</option>
<option>
<value>1</value>
<explanation>
<name>By file type</name>
<description>
Alphabetically by MIME type description, if recognized.
If not, the extension is displayed.
</desciption>
</explanation>
</option>
<option>
<value>2</value>
<explanation>
<name>By size</name>
<description>
In kB
</desciption>
</explanation>
</option>
<option>
<value>3</value>
<explanation>
<name>By date</name>
<description>
Last change, descending order.</p>
Format determined by OS locale settings.
</desciption>
</explanation>
</option>
</pref>
</module>
</preferences>
--
Ben Bucksch
http://www.bucksch.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic