473,402 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

DTD generation from XML Schema

I think this is a sensible question but am happy to be pointed out the
error of my ways.

I am specifying a new product for which I would like to have an XML
Schema interface (not sure whether W3C or Relax NG as yet). I would
also like to have a DTD that describes the same interface for those
clients who are unable to use Schemas for one reason or another. Is it
possible to generate a DTD from a given Schema ? I can seem to find
lots of things about specific tools generating DTD's and Schemas from
a given XML document.

However logically I would like to maintain one schema for which I can
then generate an equally valid DTD and also example XML documents.

BTW: I would ideally like this to be possible from either command line
such that it can be hooked into the build process or from some kind of
Emacs mode ?

Appreciate any help in advance.....

--
Rob Exley
Jul 20 '05 #1
2 2168


Rob Exley wrote:
I think this is a sensible question but am happy to be pointed out the
error of my ways.

I am specifying a new product for which I would like to have an XML
Schema interface (not sure whether W3C or Relax NG as yet). I would
also like to have a DTD that describes the same interface for those
clients who are unable to use Schemas for one reason or another. Is it
possible to generate a DTD from a given Schema ? I can seem to find
lots of things about specific tools generating DTD's and Schemas from
a given XML document.

However logically I would like to maintain one schema for which I can
then generate an equally valid DTD and also example XML documents.


I am not going to say that it is not solvable but at least a W3C XML
schema can specify/constrain a lot of things a DTD can't do, for
instance if you use some regular expression pattern to restrict the
value of an element or attribute how would you want to express that in a
DTD?
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2
Martin Honnen <ma*******@yahoo.de> wrote in message news:<40******@olaf.komtel.net>...
Rob Exley wrote:
I think this is a sensible question but am happy to be pointed out the
error of my ways.

I am specifying a new product for which I would like to have an XML
Schema interface (not sure whether W3C or Relax NG as yet). I would
also like to have a DTD that describes the same interface for those
clients who are unable to use Schemas for one reason or another. Is it
possible to generate a DTD from a given Schema ? I can seem to find
lots of things about specific tools generating DTD's and Schemas from
a given XML document.

However logically I would like to maintain one schema for which I can
then generate an equally valid DTD and also example XML documents.


I am not going to say that it is not solvable but at least a W3C XML
schema can specify/constrain a lot of things a DTD can't do, for
instance if you use some regular expression pattern to restrict the
value of an element or attribute how would you want to express that in a
DTD?


I am happy to lose validation information that I have no way to
specify in the DTD as long as the structure and relationships
cardinality etc are maintained. I appreciate that using schemas I can
provide a lot better validation for any documents using the schema.
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Steve Jorgensen | last post by:
In a schema I've been working on recently, a convention I evolved was to use a consistent naming pattern such that, for instance, a Resident could appear in a ResidentSet, and could be referred to...
2
by: Bart Torbert | last post by:
I am using XMLSPY to create various XML Schemas. In text documents we have the XPATH mapped to various of our databases. Here is the problem----- How do I verify that I don't have any typos in...
2
by: Marek | last post by:
Actually, the very first question I should ask is "does it make sense at all?". For 2 days I've been trying to generate C# classes using XML schema and xsd.exe tool. So far the results are not...
0
by: Gretchen Greene via .NET 247 | last post by:
Having trouble using xsd.exe to generate c# classes from schemabelow. I try xsd /c oai_dc.xsd and get schema validationerrors, i.e. element is not declared. I have also triedspecifying namespace...
9
by: Hayato Iriumi | last post by:
Hello, I hear some hypes about creating code to generate C# or VB .NET code, that is, code generation (sounds straight forward enough). I haven't really seen how it's done in real world. I'm...
0
by: Kevin Burton | last post by:
I searched some of the documentation and this description of my problem came closest: The following original schema element definitions contain minOccurs or maxOccurs attributes: <xs:element...
0
by: WideBoy | last post by:
Dear Group, I have recently started working with a large XML schema built to expose a domain specific data model in XML. I was wondering if any one has any ideas on how best to develop an XML...
0
by: RYoung | last post by:
Hi all, Hope no one minds this long message, but I'm puzzled: --------------- The following is a shortened version of schema located at...
1
by: Mani Jayadevan | last post by:
Sevket, Were you able to resolve the issue? I am facing the same problem. If you have already resolved it please let me know how you did it? Thanks Mani EggHeadCafe - .NET Developer...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.