W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2005

Re: Migration from DTD to XSchema

From: <noah_mendelsohn@us.ibm.com>
Date: Mon, 3 Oct 2005 11:14:58 -0400
To: "Pete Cordell" <petexmldev@tech-know-ware.com>
Cc: "Henry Luo" <henryluo@vibrasoft.net>, xmlschema-dev@w3.org
Message-ID: <OF6387649D.67BB12C5-ON8525708F.0053A727-8525708F.0053C4E8@lotus.com>

FYI:  among the reasons that XML Schema doesn't provide a mechanism for 
entities is that XML 1.0 as published provides that entities must be 
declared in DTDs.  Had XML been more extensible in this regard, then there 
is a good chance Schema would have provided a means to declare entities. 
XML is very extensible with respect to what users can write, not very 
extensible in replacing or augmenting its own core mechanisms.

Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142

"Pete Cordell" <petexmldev@tech-know-ware.com>
Sent by: xmlschema-dev-request@w3.org
09/23/2005 04:31 AM
        To:     "Henry Luo" <henryluo@vibrasoft.net>
        cc:     <xmlschema-dev@w3.org>, (bcc: Noah 
        Subject:        Re: Migration from DTD to XSchema

Hi Henry,

My main focus is the data oriented side where it's fairly easy to do 
general entities.  As such I'm afraid I'm not able to comment on general 
entity rich applications such as XHTML.

My only guess is, if you know you have XHTML text, then you probably have 
XHTML aware code to make sense of it.  This could have the knowledge of 
general entities built into it, either hard-coded or by some implicit 
knowledge of where the appropriate external DTD is.  Hence the XHTML 
entities would be opaque to the XML wrapper layer.

I guess this is the difference between fixed application specific entities 

and dynamically assigned entities used for brevity etc.

On the other hand, perhaps I ought to stop guessing!

----- Original Message ----- 
From: "Henry Luo" <henryluo@vibrasoft.net>
To: "Pete Cordell" <petexmldev@tech-know-ware.com>
Cc: <xmlschema-dev@w3.org>
Sent: Friday, September 23, 2005 8:56 AM
Subject: Re: Migration from DTD to XSchema

> Hi, Pete
> Thanks for the clarification.
> My initial hope is that XML Schema can help me get rid of DTD complete. 
> But it seems not always possible.
> For example, if in my application, I'd like to make use of XHTML 
> as part of my schema, the issues is how to handle those general XHTML 
> entities?
> If I don't include those XHTML entities in my schema, then probably I'll 

> not always be able to cut and paste XHTML source code into my document.
> If I do declare those XHTML entities in my reduced leftover DTD, 
> definitely I cannot make it internal in each of my document, too bulky.
> I'll have to put them in external DTD, then as we all know, 
> parser might not be happy with that.
> Won't our live be easier if XML includes those HTML entities by default?
> Henry
> Pete Cordell wrote:
>> Hi Henry,
>> The answer is yes and no!
>> There is no equivalent to general entities (&foo;), but that can be 
>> as part of an internal DTD in an XML instance document.  (Unless you 
>> a controlled environment general entities in external DTDs are best 
>> avoided in case your instance ends up at a non-validating parser.)  So 
>> this use of entities is not really in scope for schema.
>> One use for parameter entities (%foo;) is the defininition of common 
>> groups of element references, e.g.:
>> <!ENTITY foo % "(bar | la | tee)">
>> then
>> <!ELEMENT MyElement ( a | b | %foo; )>
>> Schema supports this use with the xs:group construct.
>> I can't think of other uses of parameter entities are supported.
>> Conditional inclusion of DTD sections is not supported either.
>> HTH,
>> Pete.
>> -- 
>> =============================================
>> Pete Cordell
>> Tech-Know-Ware Ltd
>>                         for XML to C++ data binding visit
>>                         http://www.tech-know-ware.com/lmx
>>                         (or http://www.xml2cpp.com)
>> =============================================
>> ----- Original Message ----- From: "Henry Luo" <henryluo@vibrasoft.net>
>> To: <xmlschema-dev@w3.org>
>> Sent: Thursday, September 22, 2005 7:40 PM
>> Subject: Migration from DTD to XSchema
>>> Hi, Everyone
>>> I'm new to this list. I'm not sure whether the following question has 
>>> been asked.
>>> I'm planning to migrate out from DTD to XML Schema on some of our XML 
>>> files.
>>> However, I cannot find the equivalent of the DTD Entity declaration in 

>>> XML Schema, or is there?
>>> So does it mean that I can only convert the element and attribute 
>>> from DTD to XML Schema, and still have to leave entity declarations in 

>>> DTD?
>>> Henry
Received on Monday, 3 October 2005 15:15:18 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:08 UTC