1 / 9

Document Markup

Document Markup. SNU IDB Lab. Table of Contents. Elements Attributes Reserved Attributes Declarations. Elements. An element consists of a start tag, an end tag, and data e.g.) Are you going to <name> Scarborough </name> failr ? Element names are case-sensitive

minda
Download Presentation

Document Markup

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Document Markup SNU IDB Lab.

  2. Table of Contents Elements Attributes Reserved Attributes Declarations

  3. Elements • An element consists of a start tag, an end tag, and data • e.g.) Are you going to <name> Scarborough </name> failr ? • Element names are case-sensitive • Some hierarchical structures may be recursive

  4. Elements • Content types • element content • an element that does not directly contain text, but contains other elements • mixed content • an element that contains a mixture of elements and text • data content • an element that happens to contain only text • empty element • an element that may not be allowed to contain data

  5. Elements mixed content data content <section> <p> … </p> <p> This paragraph contains an <em>emphasized phrases</em> in the middle. </p> <p> This paragraph contains a figure <fig …/> here. </p> <list> … </list> </section> empty element element content

  6. Attributes • Provides refined information about an element • Embedded in the element start-tag • Consists of an attribute name and an attribute value • value is enclosed by quotes • name and value are case-sensitive

  7. Reserved Attributes • Languages • ‘xml:lang’ is reserved for storage of both language and country details • e.g.) <para xml:lang=“en”> … </para> • sub-code specify a country code • e.g.) <instruction xml:lang=“en-GB”> … <instruction>

  8. Reserved Attributes • Significant spaces • ‘xml:space’ is reserved for distinguish space characters in elements that contain other elements from spaces in elements that contain text • possible values : ‘default’, ‘preserve’

  9. Declarations • Contain instructions to the XML processor • Delimited by ‘<!’ and ‘>’ • Types of declarations • document type declaration • e.g.) <!DOCTYPE MyBook> • comments • e.g.> <!-- This is a comment --> • character data sections • <![CDATA[Press the <<<Enter>>> button.]]> • XML declaration • <?XML version=“1.0” encoding=“UTF-8” standalone=“yes” ?>

More Related