creating javadoc like document from DTD

sun-domain_1_1.dtd is installed with Sun Java System Application Server (I think GlassFish install has this file, too). It has definitions for majority of the whole AppServer configuration data. The config data is saved in a file called domain.xml. I found a tool called DTDDoc so I gave it a try.


$ head -2 SUNWappserver/domains/domain1/config/domain.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE domain PUBLIC "-//Sun Microsystems Inc.//DTD Application Server 8.0 Domain//EN" "http://www.sun.com/software/appserver/dtds/sun-domain_1_1.dtd">
$ ls -l ../SUNWappserver/lib/dtds/sun-domain_1_1.dtd
-rw------- 1 user0 staff 144569 Dec 12 14:02 ../SUNWappserver/lib/dtds/sun-domain_1_1.dtd
$ unzip DTDDoc_1_1_0.zip
$ cd DTDDoc
$ cp default.properties /tmp/work.properties
$ vi /tmp/work.properties
$ diff default.properties /tmp/work.properties
5c5
< acceptList=\^.\*.dtd$
---
> acceptList=sun-domain_1_1.dtd
7c7
< DTDsourceDir=example
---
> DTDsourceDir=../SUNWappserver/lib/dtds
10c10
< docTitle=DTDDoc Example
---
> docTitle=SJSAS domain.xml
$ java -jar DTDDoc.jar /tmp/work.properties
Info: Welcome to DTDDoc !
Info: Configuration used is in :/tmp/work.properties
Info: Source dir : ../SUNWappserver/lib
Info: Destination dir : example_doc
Info: Scanned ../SUNWappserver/lib/dtds/sun-domain_1_1.dtd
Info: Parsing '../SUNWappserver/lib/dtds/sun-domain_1_1.dtd'...
Info: Making doc for 'dtds/sun-domain_1_1.dtd' [UTF-8]
Warning: UNDOCUMENTED attribute 'application-root' in element 'domain'
Warning: UNDOCUMENTED attribute 'log-root' in element 'domain'
Warning: UNDOCUMENTED attribute 'locale' in element 'domain'
Warning: UNDOCUMENTED attribute 'name' in element 'lifecycle-module'
...[omitted]...
Info: Making the entities page for sun-domain_1_1.dtd...
Info: Making 'index.html'...
Info: Making the introduction page in 'intro.html'...
Info: Making the table of content in 'toc.html'...
Info: Making the elements' index 'elementsIndex.html'...
$ ls -l example_doc/\*.html
-rw------- 1 user0 staff 11125 Dec 14 23:44 example_doc/elementsIndex.html
-rw------- 1 user0 staff 946 Dec 14 23:44 example_doc/index.html
-rw------- 1 user0 staff 874 Dec 14 23:44 example_doc/intro.html
-rw------- 1 user0 staff 79865 Dec 14 23:44 example_doc/toc.html
$ firefox example_doc/index.html

These AppServer elements/properties can be set via nice browser UI called 'Admin Console'. There may be a document similar to this 'javadoc' like one. But in case there isn't and you still want to understand the structure, DTDDoc can help.

Comments:

Hi Katsumi,

Interesting technology - thank you for blogging about it. I particularly like how the sidebar table of contents gives an overview of the structure of elements in the DTD.

As you suggested, the Application Server product documentation includes a document that provides information about the elements in the sun-domain_1_1 DTD (of which the domain.xml file is an instance). For the Application Server 9.1 Release, see Sun Java System Application Server 9.1 Administration Reference at http://docs.sun.com/app/docs/doc/819-3674 .

Best regards,

Posted by Paul Davies for the Application Server Documentation Team on December 14, 2007 at 06:56 PM JST #

Paul,

Thanks for your comment. There is also xsddoc and I'm looking for a nice sample xsd file.

Posted by Katsumi INOUE on December 16, 2007 at 05:17 PM JST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today