Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to create DTD(document type definition) for data matrix printer language. I want to define contents like barcode, line, box, x-axis, y-axis position etc. Can anyone help?
Posted

1 solution

This is not really a question. The answer would be: learn XML and implement all you want. You did not explain any particular concerns. You did not tell us anything about your language design, requirements, nothing like that.

Please see:
http://www.w3.org/TR/REC-xml[^],
http://www.w3.org/TR/REC-xml/#sec-prolog-dtd[^],
http://www.w3.org/TR/REC-xml/#sec-rmd[^],
http://www.w3.org/XML/1998/06/xmlspec-report-v21.htm[^].

But I have another idea. There is a newer way of describing the XML metadata, XML Schema:
http://en.wikipedia.org/wiki/XML_Schema_(W3C)[^],
http://www.w3.org/standards/xml/schema[^].

Frankly, DOCTYPE is ugly language with a lot of limitations. Its description in W3 standards is hard from perfect. It's hard or almost impossible to find a good DOCTYPE parser; and this is probably because its use is limited.

In contrast to that, XML schema is itself written in XML, so it can be parsed by many different tools; some of them are semantic-aware. There are enough of schema validation tools (validating XML against the schema). And the schema has much better expressive power, is much more flexible.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900