1. Trang chủ
  2. » Tất cả

TP3

44 142 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Nội dung

Displaying XML Documents Using CSS and XSLChapter 3 Core XML / Chapter 2 / Slide 2 of 25Review-1A well-formed document is one that conforms to the basic rules of XML.A valid document is well formed and is also validated against a DTD.The DTD specifies the grammatical structure of an XML document, thereby allowing XML parsers to understand and interpret the document’s contents.The use of the SYSTEM keyword indicates to the parser that this is an external declaration, and that the set of rules for this XML document can be found in a specified file.EMPTY element-content type specifies that the element has no child elements or character data. Core XML / Chapter 2 / Slide 3 of 25Review-2#CDATA means that the element contains character data that is not to be parsed by a parser.#PCDATA means that the element contains data that is to be parsed by a parser. Specifying a default value for an attribute in the DTD ensures that the attribute will get a value, even if the author of the XML document does not include it.Specifying the value of an attribute as ‘Implied’ means that the particular attribute is not mandatory and can be specified in the XML document. Specifying the value of an attribute as ‘Required’ means that the particular attribute is mandatory (that is, its value must be provided in the XML document). Core XML / Chapter 2 / Slide 4 of 25Review-3‘ID’ is the identifier type, and should be unique. This attribute value is used to search for a particular instance of an element. Each element can only have one attribute of type ID. A DTD can be either External or Internal. Entities allow us to create an alias to some large piece of text, so that, in the document, the same piece of text can be referred to, simply by referring to the alias. Namespaces allow us to combine documents from different sources, and be able to identify which elements or attributes come from which source. Core XML / Chapter 3 / Slide 5 of 34ObjectivesDisplay an XML document in a browserIdentify the style rules of CSSDiscuss different patterns and templates of XSLApply different styles to XML elements using CSS and XSLTransform XML documents into HTML documents using XSLTIdentify the differences between CSS and XSL Core XML / Chapter 3 / Slide 6 of 34Style Sheets - 1An XML document can be displayed in different formats in different display devices such as computer, printer, and the like.Document to be displayed Core XML / Chapter 3 / Slide 7 of 34Style Sheets - 2A Style sheet is a set of instructions to display the documents:Style sheetsDataPresentation Layer It separates presentation layer from the content data of the document.A single XML document can have multiple style sheets Core XML / Chapter 3 / Slide 8 of 34Style Sheets - 3A few style sheets available in the market include:CSS- Cascading Style SheetsXSL-eXtensible Style sheet LanguageDSSL-Document Style Semantics and Specification Language Core XML / Chapter 3 / Slide 9 of 34Uses of CSS and XSLCascading style sheetis used to manipulateVisibility of an elementPositioning and sizing of elementsColors and BackgroundFont and Text SpacingXSL is used for formatting and converting documents written in one XML DTD into another DTD. Core XML / Chapter 3 / Slide 10 of 34XML and Style SheetsXML documents are plain text files.The style sheets are used to format and view the XML document.Two commonly used style sheets with XML are:CSS - an extension of HTMLXSL - an XML specific styling language 123doc.vn

Ngày đăng: 12/01/2013, 15:43

Xem thêm