We help IT Professionals succeed at work.

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

194 Views
Last Modified: 2018-09-28
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?
Comment
Watch Question

Chinmay PatelChief Technology Ninja
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
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.
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2015
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Tom KnowltonWeb developer

Author

Commented:
What does HTML5 use?
Chinmay PatelChief Technology Ninja
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
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
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.