Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Migration from DTD to XSchema

From: Henry Luo <henryluo@---------.--->
To: Pete Cordell <petexmldev@--------------.--->
Date: 9/23/2005 11:57:00 PM
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 
elements 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, 
non-validating 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 
> left as part of an internal DTD in an XML instance document.  (Unless 
> you have 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@v...>
> To: <xmlschema-dev@w...>
> 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 
>> schema from DTD to XML Schema, and still have to leave entity 
>> declarations in DTD?
>>
>> Henry
>>
>>
>>
>
>
>


From petexmldev@t... Fri Sep 23 08:32:25 2005
Received: from maggie.w3.org ([193.51.208.68])
	by frink.w3


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent