OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Advice on DTD's

[ Lists Home | Date Index | Thread Index ]
  • From: "Rick Jelliffe" <ricko@allette.com.au>
  • To: <xml-dev@ic.ac.uk>
  • Date: Tue, 22 Jun 1999 05:32:47 +1000


From: Andrew Wheeler <akwheel@talos.org>


>>   [Andrew Wheeler]  Your solution seems to be exactly what I don't
>> want, i.e. writing bespoke code that we have to maintain.

Attached is an example of the HTML I had in mind. If you want
a cheap low-tech approach to keeping descriptions "together" with the
DTD,
you can put all sorts of text data in comments, and you can add
links to non-text descriptions if you need diagramming.  If you are
making DTDs with only a couple of hundred elements, consider
if this is all you really need.

You don't need any special code for it.  (Though it could be automated
to generate indexes automatically.)

If you need a tad more managability, create a DTD and use XSL to
transform your schema from that an instance of that DTD  into HTML.
The XSL script to do this need only be a page long: hardly a maintenance
nightmare. (If you are not able to support that kind of scripting,
how are you using XML?  Just interested.)

>From your response, and others, then I think
>maybe we are asking too much, also given the fact that XML Schema is on
>the way this limited tool support may change direction anyway! Are we
>being unreasonable?

No I think it comes from there has been little market for this kind of
tool: people developing XML/SGML are in the business of converting
and linking data; they have usually been able to hack something together
themselves. (And at the high end, if they were using an SGML tool like
FrameMaker or Interleaf,  these both provide rich document-type
documentation systems.)

Also, tools are often tied to methodologies, and I  think few
medium-end users have stuck to published methodologies.

If you are wanting systems that allow you to document source code
(including DTDs) with hypertext, you could consider DOCBOOK.

If you want to go from describing to validating and your elements'
contents have particular datatypes, XML Schema Datatypes could
indeed be what you are waiting for.

Rick Jelliffe
Title: Example of DTD in HTML
  

<!-- Example DTD   
blah
blah
blah
blah
blah
blah
blah
blah -->
                            

<!-- Element a is the top-level element -->
<!ELEMENT a ( b )>

<!--CONTENTS: blah --> 
<!--USAGE: blah --> 
<!--ALLOWABLE VALUES: blah -->
<!--EXAMPLE: blah -->
<!--
blah
blah
blah
blah -->

<!-- Element b is the bottom element -->
<!ELEMENT b (#PCDATA )>
    
<!--CONTENTS: blah --> 
<!--USAGE: blah --> 
<!--ALLOWABLE VALUES: blah -->
<!--EXAMPLE: blah -->
<!--
blah
blah
blah
blah -->



<!ATTLIST a 
    id ID  #REQUIRED >

<!--CONTENTS: blah --> 
<!--USAGE: blah --> 
<!--ALLOWABLE VALUES: blah -->
<!--EXAMPLE: blah -->
<!--
blah
blah
blah
blah -->


    
 <!-- ID attributes must be unique -->

<!-- #PCDATA means that this element can have data (text), PIs, entity 
and character references, but no sub-elements --> 
<!--
blah
blah
blah
blah
blah
blah
blah
blah -->  
<!-- 
blah
blah
blah
blah
blah
blah
blah
blah -->





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS