Click to See Complete Forum and Search --> : Converting from DTD to schema, Where should i place the details?
Hi,
I converted the following DTD :
<?xml version="1.0" encoding="utf-8" ?>
<author>Ray Charles</author>
To the following schema:
<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema">
<xsd:element name="author" type="xsd:string" />
<xsd:schema/>
I dont know where to place the Ray Charles string.
It doesnt apear in the msdn and xml.com tutorials.
I probably miss something here.
Thanks
rdbms
07-26-2001, 09:27 AM
Hellow Itay,
The content that you posted in your message was not a DTD. It was an XML
document instance.
re:
><?xml version="1.0" encoding="utf-8" ?>
><author>Ray Charles</author>
It appears that you either created (or possible generated using a tool such
as XML Spy or XML Authority) a corresponding XML Schema to represent the
organization, structure, and data type for the XML document instance.
An example of a DTD that might have reflected your XML document content would
look something like:
<!ELEMENT Author (#PCDATA)>
Although I assume this is just a simple educational example and it will parse,
I would hesitate to create an XML document where the root element was the
only container for the entire document.
Depending upon your environment, your parsing technology, and how you had
intended to process the XML content, a Schema (somewhat similar in concept
to a DTD) would represent a set of "rules" and "constraints" for your XML
document instance.
I would suggest taking a look at any of the introductory XML publications
commercially available.
I hope this helps.
jb
"Itay" <saliitay@yahoo.com> wrote:
>
>Hi,
>
>I converted the following DTD :
>
><?xml version="1.0" encoding="utf-8" ?>
><author>Ray Charles</author>
>
>To the following schema:
>
><xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema">
> <xsd:element name="author" type="xsd:string" />
> <xsd:schema/>
>
>I dont know where to place the Ray Charles string.
>It doesnt apear in the msdn and xml.com tutorials.
>
>I probably miss something here.
>
>Thanks
>
>
>
devx.com
Copyright Internet.com Inc. All Rights Reserved