Since schema has functionality which has no equivalent in a DTD, you will
probably not find any tools to do XSD-toDTD conversion (even if you
do they will be pretty limited in what they can do). You can probably
create a sample XML file and use a dtd generator but it would proabbly be
easier to
write the dtd by hand anyways.


Ankit Pasricha
XML Parser Development
IBM Toronto Lab
8200 Warden Avenue, Ontario L6G 1C7
Phone: (905) 413 4941


                                                                           
             [EMAIL PROTECTED]                                             
             com                                                           
                                                                        To 
             08/17/2004 09:45          [EMAIL PROTECTED]        
             AM                                                         cc 
                                                                           
                                                                   Subject 
             Please respond to         Re: Special characters in XML being 
             [EMAIL PROTECTED]         validated against a schema          
                .apache.org                                                
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Hi,

Thanks for giving me a ray of hope now.  Thanks very much indeed :)


So does this mean i need to create a DTD file as well for the
XML docs that im creating ? because currently i only have a
schema for the XML docs.  Is there any tool/link that can help
me converting from a Schema to a DTD ? i actually did a search
on it but all i could find was DTD to Schema converters and not
the other way round.

Ok worst case scenario - i make the DTD myself. Then i need to
add the following code to the top of my XML docs...am i right ?


<?xml version="1.0" ?>
<!DOCTYPE SYSTEM "MyDTD.dtd">

<myRootElement
xmlns='http://www.xyz.com/ContentMetaData'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://www.xyz.com/ContentMetaData
ContentMetaData.xsd'>

Which essentially means i will be using a DTD as well as the Schema for my
validation
process ?


Chetan





"C. M. Sperberg-McQueen" <[EMAIL PROTECTED]>
08/17/2004 07:04 PM

Please respond to
[EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc

Subject
Re: Special characters in XML being validated against a schema






On Mon, 2004-08-16 at 23:03, [EMAIL PROTECTED] wrote:
> Hi,
>
> I am new to XML and to the group. I am trying to include special
> characters
> into an XML which is to be validated (using xalan) against a schema.
> I know how its done for an XML file using a DTD for validation but how
> do i do it for an XML being validated against a schema.

You do it in exactly the same way.  By which I
mean: with a DTD.  The XML Schema validation operates
against the XML infoset, after entities and
character references are expanded.  Use a DTD at
the 'front' end of processing (so to speak) to
handle entities, and a schema at the 'back' for
constraining the element and attribute structure.

I hope this helps.

-C. M. Sperberg-McQueen
 World Wide Web Consortium
 MIT Computer Science and AI Lab



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


ForwardSourceID:NT0000260A

(See attached file: InterScan_Disclaimer.txt)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Attachment: InterScan_Disclaimer.txt
Description: Binary data

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to