Re: Fwd: Re: Why bother using DTDs?

After thinking about it, I found the solution I liked best was:

<?xml-namespace prefix="http" ns="http://www.w3.org/1999/xhtml" 
schemaLoc="http://www.w3.org/1999/xhtml/schema.xsd" schemaType="text/xsd ?>

Which comes from a blog entry I wrote:
http://zerotrilogy.gotdns.com/sheepnews/archive/2004/04/05/168.aspx

I've always disliked the namespace stack and have wanted to see a solution 
that incorperated a single include. It always seems as if people end up 
declaring all their used namespaces at the very top anyway. This also seems 
like a much simpler solution to implement.

Needing to validate data against a schema is not something that's limited to 
a group of problems. All data may at some point need to be validated and it 
seems to me that there needs to be a generic way of specifying that kind of 
information. The schemaType attribute on the instruction above tells the 
processor which engine to use.

Admittedly the prefix attribute this doesn't play nice with the namespace 
stack as it stands and it could be removed, however the rest of it makes 
sense and seems highly useful.

As to the other topic... creating entities a similar solution can be 
presented:

<?xml-entities href="" type="" ?>

Mind you, I'm not very good at naming things. However just like above, this 
allows an author to include a set of entities at the specified href 
formatted in the type's language. This gives us another generic mechanism 
for entities (again something that every document might need). It also 
allows common entities sets to be produced and standardized.

Orion Adrian

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfeeŽ 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

Received on Wednesday, 14 April 2004 12:43:09 UTC