edoc structure
Vlad Dumitrescu
vlad_dumitrescu@REDACTED
Thu Apr 4 08:47:28 CEST 2002
>It would help if you provided a DTD: it's essential for validation of the
>document grammar, and later validation of the document instances.
Yes, of course. I just thought that the DTD is much harder to read if one
isn't used to reading DTDs.
>Are there no existing DTDs with existing tools which would do the job?
Couldn't find any. More precisely, there is Erlang specific information that
would be difficult to store using a general DTD - it would come more or less
to using something like
...<thing name="behaviour">
gen_server
</thing>...
or even
...<thing>
<name>
behaviour
</name>
<value>
gen_server
</value>
</thing>...
I did write a DTD, which I attach here, and also tried to document it as a
W3C schema. However the resulting HTML file is ~40k zipped and I'm not sure
if everyone would be happy to have the mailbox clogged with it. Let me know
if it's interesting.
best regards,
Vlad
<?xml version="1.0" encoding="ISO-8859-1"?>
<!ELEMENT application (name, version, authors?, description?, since?,
deprecated?, see?, modules, references?, copyright?)>
<!ELEMENT authors (author+)>
<!ELEMENT deprecated (description)>
<!ELEMENT description (briefdescription, fulldescription?)>
<!ELEMENT function (name, parameters, return, description?, equiv?, since?,
deprecated?, see?)>
<!ATTLIST function
exported NMTOKEN(yes | no) #REQUIRED
>
<!ELEMENT functionref (modulename?, functionname)>
<!ELEMENT module (name, version?, authors?, behaviour?, description?,
since?, deprecated?, see?, types?, functions)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT parameter (name, valuetype, description?)>
<!ELEMENT see (seelabel*, functionref*)>
<!ELEMENT since (#PCDATA)>
<!ELEMENT version (#PCDATA)>
<!ELEMENT modules (module+)>
<!ELEMENT references (usageexamples?, websites?, listservs?, newsgroups?,
books?)>
<!ELEMENT copyright (#PCDATA)>
<!ELEMENT author EMPTY>
<!ATTLIST author
name CDATA #IMPLIED
email CDATA #REQUIRED
website CDATA #IMPLIED
>
<!ELEMENT briefdescription (#PCDATA)>
<!ELEMENT fulldescription (#PCDATA)>
<!ELEMENT parameters (parameter+)>
<!ELEMENT return (valuetype, description?)>
<!ELEMENT equiv (functionref)>
<!ELEMENT modulename (#PCDATA)>
<!ELEMENT functionname (#PCDATA)>
<!ELEMENT behaviour (#PCDATA)>
<!ELEMENT types (type+)>
<!ELEMENT functions (function*)>
<!ELEMENT valuetype (#PCDATA)>
<!ELEMENT seelabel (#PCDATA)>
<!ELEMENT usageexamples (usageexample+)>
<!ELEMENT websites (website+)>
<!ELEMENT listservs (listserv+)>
<!ELEMENT newsgroups (newsgroup+)>
<!ELEMENT books (book+)>
<!ELEMENT valuetype (#PCDATA)>
<!ELEMENT type (name, value, description?)>
<!ELEMENT usageexample EMPTY>
<!ATTLIST usageexample
href CDATA #REQUIRED
role CDATA #IMPLIED
title CDATA #IMPLIED
>
<!ELEMENT website EMPTY>
<!ATTLIST website
href CDATA #REQUIRED
role CDATA #IMPLIED
title CDATA #IMPLIED
>
<!ELEMENT listserv EMPTY>
<!ATTLIST listserv
href CDATA #REQUIRED
role CDATA #IMPLIED
title CDATA #IMPLIED
>
<!ELEMENT newsgroup EMPTY>
<!ATTLIST newsgroup
href CDATA #REQUIRED
role CDATA #IMPLIED
title CDATA #IMPLIED
>
<!ELEMENT book EMPTY>
<!ATTLIST book
author CDATA #REQUIRED
title CDATA #REQUIRED
ISBN CDATA #IMPLIED
>
<!ELEMENT value (#PCDATA)>
_________________________________________________________________
MSN Photos är det enklaste sättet att dela ut och skriva ut foton:
http://photos.msn.se/Support/WorldWide.aspx
More information about the erlang-questions
mailing list