Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: DTD design practices

From: "Girish Sharma" <remvgirish.sharma@---------.--->
To: NULL
Date: 4/1/2006 1:54:00 AM

Thank you for the helpful replies to my questions.

Girish Sharma

"Girish Sharma" <remvgirish.sharma@e...> wrote in message 
news:2ooUf.5961$x94.4248@n......
> I'm new to using XML. I am currently required to use dtd's rather than 
> schemas. I have some questions about what is considered appropriate design 
> with a dtd. It seems that none of the following are enforced by the dtd 
> during a standard validation:
>
> 1. Using the value of attributes to constrain which of the optional child 
> elements are allowed to be used.
>
> 2. Restricting the number of a particular element that can exist with a 
> particular attribute value.
>
> 3. Restricting which of some optional child elements are allowed based on 
> the context (the grand-parent element) of the parent element.
>
> Is creating a dtd that uses these concepts, even though they are not 
> enforced during standard validation, considered less than optimal design?
>
> Are there commonly used alternatives to the above that do allow for dtd 
> enforcement?
>
> I'm wondering for example for number 1, instead of attribute values using 
> optional child elements that correspond with each of those values. Then 
> each of those child elements can in turn can have the desired child 
> elements for that situation. It could result in a large number of the 
> "intermediate" child elements if there are many possible attribute values.
>
> For number 2, is there any way to accomplish that using child elements 
> instead of attribute values?
>
> For number 3, it seems that changing the parent element into several 
> similar elements and then using the appropriate one in the correct 
> context. If carried to an extreme though, there would be no optional child 
> elements at all - only different parent elements. But my question relates 
> specifically about always being required to use particular optional child 
> elements based on context.
>
> Thank you.
>
> Girish Sharma
> 




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