XML Implementations - HTML

Most XML implementations you encounter as a Web developer will involve XSLT on some level, unless you’re writing your XHTML from scratch. However, a few XML implementations in existence won’t directly involve XSLT. For example, it’s just as likely as not that your XHTML will be developed without XSLT intervention. You may also encounter Web services XML vocabularies such as Simple Object Access Protocol (SOAP), Web Services Description Language (WSDL), and Universal Description, Discovery, and Integration (UDDI). Then there are the widget-based XML vocabularies for visual interface development, such as XUL, which is an XML vocabulary for developing Mozilla skins.

XHMTL is the newest edition of HTML released by the W3C. The plan is to eventually deprecate all versions of HTML prior to XHTML. In other words, as far as the W3C is concerned, XHTML is the current version of HTML It’s also possible to transform XHTML into another format, even HTML 4.0. The biggest difference between HTML and XHTML is that XHTML must follow the rules of XML syntax. The elements and attributes used by XHTML are basically the same as HTML, except that you must use a closing tag in an empty element, such as the br element, like this:

Note the extra space after the br characters. This is done for backwards compatibility. If you end the tag without the space (<br/>), older browsers won’t recognize the br element. When you create XHTML from XSLT, you must specify the PUBLIC and System DOCTYPE using the xsl:output element:

<xsl:output doctypesystem=“ P1: KTU WY022-32 WY022/Pfaffenberger WY022/Pfaffenberger-v3.cls June 12, 2004 22:6 transitional.dtd” doctype-public=“-//W3C//DTD XHTML 1.0 Transitional//EN” method=“html” version=“4.0” encoding=“ISO- 8859-1” indent=“yes”/>

This will generate the following:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” ><html> ...</html>

You also need to indicate the namespace for XHTML within the xsl:stylesheet element:

XHTML elements are also all case-sensitive, and must be in lower case. Listing shows an XSTL document transforming Listing into an XHTML document.

Creating an XHTML Document with XSLT

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

HTML Topics