Set - 2

Question 1 :

Any other important new developments?

Answer :

Yes: XSLT provides a transformation language which can be used to transform XML documents into other formats. XSLT can be used to transform documents from one XML DTD to another, or even to transform an XML document to an alternative format such as RTF or PDF.

Question 2 :

Why is this XSLT important?

Answer :

You've heard all the hype about mobile phones and WAP haven't you? How do you think the WAP world, which expects documents to be in WML format, to be populated? Rather than manually creating WML markup, XSLT will enable XHTML documents to be automatically converted to WML.

Question 3 :

What's XHTML Validation?

Answer :

An XHTML document is validated against a Document Type Definition.
Validate XHTML With A DTD

An XHTML document is validated against a Document Type Definition (DTD). Before an XHTML file can be properly validated, a correct DTD must be added as the first line of the file.

The Strict DTD includes elements and attributes that have not been deprecated or do not appear in framesets:

"-//W3C//DTD XHTML 1.0 Strict//EN"

The Transitional DTD includes everything in the strict DTD plus deprecated elements and attributes:

"-//W3C//DTD XHTML 1.0 Transitional//EN"

The Frameset DTD includes everything in the transitional DTD plus frames as well:

"-//W3C//DTD XHTML 1.0 Frameset//EN"

This is a simple XHTML document:

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<title>simple document</title>
<p>a simple paragraph</p>


Question 4 :

Ampersands in hrefs must convert "&" to "&amp;" in the URI ?

Answer :

<a href="">Sample List</a>
<a href="">Sample List</a>

# The attribute "name" becomes "id" when used for a locator inside a document

For example, to reference a section within a document with a URI, we usually do something like

<a href="favoriteAnimals.html#meerkats">Meerkats</a>

Inside the referenced section,

<a name="meerkats"><h2>Meerkats of Africa</h2></a>


<a id="meerkats"><h2>Meerkats of Africa</h2></a>

or better yet for backwards compatibility:

<a id="meerkats" name="meerkats"><h2>Meerkats of Africa</h2></a>

# Tidy
tidy is a tool to automatically convert HTML to XHTML. You can find it at

Question 5 :

What's about an assumption with XHTML? 

Answer :

Serving XHTML with a MIME type of text/html is wrong. The whole point of XHTML is that it's XML so that you can benefit from namespaces and the like. If you serve it as text/html, you can't: 
In particular, 'text/html' is NOT suitable for XHTML Family document types that adds elements and attributes from foreign namespaces, such as XHTML+MathML [XHTML+MathML].
Two choices:
1. XHTML 1.0 served as application/xhtml+xml to conforming UAs, and text/html to Internet Explorer
2. HTML 4.01, served as text/html 
XHTML 1.1 is not an option because it mandates a MIME type of application/xhtml+xml which is incompatible with Internet Explorer