1 The MITRE Using XSL to Generate XHTML Documents Roger L. Costello XML Technologies.

Slides:



Advertisements
Similar presentations
XML-XSL Introduction SHIJU RAJAN SHIJU RAJAN Outline Brief Overview Brief Overview What is XML? What is XML? Well Formed XML Well Formed XML Tag Name.
Advertisements

CSCI N241: Fundamentals of Web Design Copyright ©2004 Department of Computer & Information Science Introducing XHTML: Module B: HTML to XHTML.
CG0119 Web Database Systems Parsing XML: using SimpleXML & XSLT.
XHTML Basics. What is XHTML? XHTML is newer than the old HTML XHTML has stricter rules and does not allow some elements formerly used in HTML One benefit.
1 HTML Standards & Compliance. 2 Minimum Required HTML tags: (must go in this order!)
Creating XHTML Documents Dr John Cowell phones off (please) 1CSCI1412-HW-6.
XSLT (eXtensible Stylesheet Language Transformation) 1.
 Fundamentals of Web Design.  Describe the history and theory of XHTML  Understand the rules for creating valid XHTML documents  Apply a DTD to an.
An Introduction to XML Based on the W3C XML Recommendations.
Pengantar Teknologi Mobile 13 Antonius Rachmat C, S.Kom, M.Cs XHTML.
History Leading to XHTML
1 CP3024 Lecture 9 XML revisited, XSL, XSLT, XPath, XSL Formatting Objects.
Tutorial 9 Working with XHTML
XHTML 16-Apr-17.
XHTML1 Building Document Structure. XHTML2 Objectives In this chapter, you will: Learn how to create Extensible Hypertext Markup Language (XHTML) documents.
1 Copyright (c) [2000]. Roger L. Costello. All Rights Reserved. Using XSLT and XPath to Transform XML Documents Roger L. Costello XML Technologies.
Tutorial 9 Working with XHTML. XP Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a.
Creating a Well-Formed Valid Document. 2 Objectives Introducing XHTML Creating a Well-Formed Document Creating a Valid Document Creating an XHTML Document.
Upgrading to XHTML DECO 3001 Tutorial 1 – Part 1 Presented by Ji Soo Yoon 19 February 2004 Slides adopted from
1 HTML’s Transition to XHTML. 2 XHTML is the next evolution of HTML Extensible HTML eXtensible based on XML (extensible markup language) XML like HTML.
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
HTML Elements. HTML documents are defined by HTML elements.
Using XSLT and XPath to Enhance HTML Documents Reference: Roger L. Costello
ECA 228 Internet/Intranet Design I Intro to XSL. ECA 228 Internet/Intranet Design I XSL basics W3C standards for stylesheets – CSS – XSL: Extensible Markup.
Working with XHTML Creating a Well-Formed Valid Document.
XP Tutorial 9New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
XP The University of Akron Summit College Business Technology Department Computer Information Systems 2440: 140 Internet Tools Instructor: Enoch E. Damson.
 XHTML is aimed to replace HTML  XHTML is almost identical to HTML 4.01  XHTML is a stricter and cleaner version of HTML  XHTML is HTML defined as.
XHTML - Basics Teppo Räisänen LIIKE/OAMK Introduction XHTML = eXtensible Hypertext Markup Language Transitional ~ HTML 4.01 Goal: to replace HTML.
CS134 Web Design & Development Creating a Basic Web Page Mehmud Abliz.
Web page - A Web page is a simple text file that contains a set of HTML tags (code) that describe (to the browser) what should go on a web page. It may.
XHTML1 Building Document Structure Chapter 2. XHTML2 Objectives In this chapter, you will: Learn how to create Extensible Hypertext Markup Language (XHTML)
Introduction. Document Structure Overview  XML declaration (prolog)  Document type declaration  Root element (namespace)  Document header  Document.
3 XHTML.
1 HTML XHTML. 2 Understand the Doctype tag Know the html tags which are now classed as depreciated Understand how Dreamweaver adds styles Add styles to.
1 XHTML محمد احمدی نیا 2 Of 19 HTML vs XHTML  XHTML is a stricter and cleaner version of HTML.  by combining the strengths of HTML.
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
CIS 1315 – Web Development for Educators CIS 1315 HTML Tutorial 9: Working With XHTML.
1 Tutorial 13 Validating Documents with DTDs Working with Document Type Definitions.
CITA 330 Section 6 XSLT. Transforming XML Documents to XHTML Documents XSLT is an XML dialect which is declared under namespace "
XSLT Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
XP Tutorial 9 1 Working with XHTML. XP SGML 2 Standard Generalized Markup Language (SGML) A standard for specifying markup languages. Large, complex standard.
Lesson 4.
17 Apr 2002 XML Syntax: Documents Andy Clark. Basic Document Structure Element tags – Elements have associated attributes Text content Miscellaneous –
Lecture 16 Introduction to XML Boriana Koleva Room: C54
1 Overview of XSL. 2 Outline We will use Roger Costello’s tutorial The purpose of this presentation is  To give a quick overview of XSL  To describe.
Lecture: Web Design Assis. Prof. Freshta Hanif Ehsan Faculty of Computer Science Kabul Polytechnic University Spring Semester
1 Copyright (c) [2000]. Roger L. Costello. All Rights Reserved. Using XSLT and XPath to Transform XML Documents Roger L. Costello XML Technologies.
Well Formed XML The basics. A Simple XML Document Smith Alice.
XML DTD. XML Validation XML with correct syntax is "Well Formed" XML. XML validated against a DTD is "Valid" XML.
XP Tutorial 9New Perspectives on HTML and XHTML, Comprehensive 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
CSS THE MISSING MANUAL Introduction. Benefits of CSS Style sheets offer more formatting choices than are offered in straight HTML  EXAMPLE: When you.
Tutorial 9 Working with XHTML. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Describe the history and theory of XHTML.
CIS 228 The Internet 9/20/11 XHTML 1.0. “Quirks” Mode Today, all browsers support standards Compliant pages are displayed similarly There are multiple.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
Tutorial 9 Working with XHTML. XP Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a.
1 XSL Transformations (XSLT). 2 XSLT XSLT is a language for transforming XML documents into XHTML documents or to other XML documents. XSLT uses XPath.
Extensible Markup Language (XML) Pat Morin COMP 2405.
Unit 4 Representing Web Data: XML
CIS 228 The Internet 9/20/11 XHTML 1.0.
Creating a Well-Formed Valid Document
CITA 330 Section 3 XHTML.
Tutorial 9 Working with XHTML
Tutorial 9 Working with XHTML
Chapter 7 Representing Web Data: XML
Web Programming Maymester 2004
Tutorial 9 Working with XHTML
CSE591: Data Mining by H. Liu
محمد احمدی نیا XHTML محمد احمدی نیا
Presentation transcript:

1 The MITRE Using XSL to Generate XHTML Documents Roger L. Costello XML Technologies

2 The MITRE What is XHTML? With HTML you can –omit end tags, –use upper case for the start tag and then lower case for the end tag (i.e., HTML if case insensitive –leave off the quotes around attribute values Clearly, these all violate XML XHTML is HTML that follows all the rules of XML

3 The MITRE HTML: XHTML: Most browsers today do not understand empty elements, e.g.,. Consequently, we must "trick" the browser. You can put a class attribute on just about any HTML element. The class attribute can have any value. So, we use the class attribute simply to get the browser to "see" this element as a break element.

4 The MITRE … HTML: XHTML: XHTML specifies that all tags be in lower case.

5 The MITRE HTML: XHTML: Quote the attribute value!

6 The MITRE <!DOCTYPE html PUBLIC "-//W3//DTD XHTML 1.0 Transitional//EN" " HTML: XHTML: 1. Add a DOCTYPE declaration with a PUBLIC identifier 2. Add a namespace declaration to the root element.

7 The MITRE Advantages of formatting your HTML as XHTML Ever notice how some web sites are broken when viewed in Netscape, but work when viewed in IE (or vice-versa)? –That's oftentimes because the HTML has missing end tags and one browser is able to "fix it" while the other isn't If it were written in XHTML then there would never be a problem with missing end tags Many web masters will check their HTML by testing it against as many browsers as they can –There are many, many browsers, and many versions of browsers, so exhaustive testing is very difficult If it were written in XHTML then it could be tested simply by validating against the XHTML DTD Due to the relative randomness of HTML it is very difficult for applications such as screen scrapers to make use of it. –With XHTML the document is much more strictly organized and hence it is easier to parse and make use of it.

8 The MITRE Generating XHTML with your stylesheet <xsl:stylesheet xmlns:xsl=" xmlns=" version="1.0"> <xsl:output method="html" doctype-public="-//W3//DTD XHTML 1.0 Transitional//EN" doctype-system=" Welcome Welcome! This default namespace declaration will generate an identical default namespace declaration in the output These instruct the XSL Processor to create a DOCTYPE declaration in the output, with a PUBLIC identifier as well as a SYSTEM identifier. (see html-example25)

9 The MITRE Here's what will be generated <!DOCTYPE html PUBLIC "-//W3//DTD XHTML 1.0 Transitional//EN" " Welcome Welcome! Notes: 1. There is no XML declaration 2. There is a DOCTYPE declaration containing a PUBLIC identifier as well as a SYSTEM identifier 3. There is a default namespace declaration 4. We can validate this XHTML document