[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Advice on DTD's
From: Andrew Wheeler <akwheel@t...> >> [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 JelliffeTitle: 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 -->
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|