Avatar of Tom Knowlton
Tom Knowlton
Flag for United States of America asked on

The Skinny on Schemas - what are they for? why were they developed? can we look at them?

Some random examples:

xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
            "http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE html>

What are these for?  What is their origin?

Can these references be viewed?  For example, the one for HTML4 I can go to the strict.dtd page, but what about the one for HTML5?  Or are they proprietary / confidential?  How do web programmers take advantage of them?
Web Development* schemasXMLWeb Languages and StandardsWeb Browsers

Avatar of undefined
Last Comment
Chinmay Patel

8/22/2022 - Mon
Chinmay Patel

Hi Tom,

I am copy-pasting from WikiPedia: https://en.wikipedia.org/wiki/XML_schema

An XML schema is a description of a type of XML document, typically expressed in terms of constraints on the structure and content of documents of that type, above and beyond the basic syntactical constraints imposed by XML itself. These constraints are generally expressed using some combination of grammatical rules governing the order of elements, Boolean predicates that the content must satisfy, data types governing the content of elements and attributes, and more specialized rules such as uniqueness and referential integrity constraints.

You can say they are the guidelines/rules to which a particular XML document has to confirm(if it is a valid one).

You can access the schema by opening it in a browser
Try: http://www.w3.org/TR/html4/strict.dtd

Regards,
Chinmay.
ASKER CERTIFIED SOLUTION
kaufmed

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Tom Knowlton

ASKER
What does HTML5 use?
Chinmay Patel

HTML being a very different language than XML there is no schema for it.

That being said, browsers from the beginning of time are not strictly (with HTML5's !DOCTYPE you can force the browsers to be standard compliant though) standards compliant. I think one of the biggest offender was Microsoft and its implementation of many IE-only features (For example, CSS Gradient support). And HTML5 is not validated via schema per say, there are specs to which your markup has to be compliant.

You can get a list of HTML specs at: https://www.w3.org/WebPlatform/WG/PubStatus#HTML_specifications
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck