Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Xschema allows same name element with different contents and DTD does not. Can you give an example?

0
Posted

Xschema allows same name element with different contents and DTD does not. Can you give an example?

0

In xml schema, same name but different contents elements can appear in different scopes, in other words, under different parents, which is not allowed in DTDs. Here is an XML example. It has two different ccc and a elements and it is valid against the schema given bellow . You also can define a DTD to make it valid, however, I don’t think that is what you really want . The DTD coerces them as the same elements, you actually want them to be different. It was fun!

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123