Download presentation
Presentation is loading. Please wait.
Published byHarvey Robertson Modified over 9 years ago
1
Introduction to Markup David J. Birnbaum University of Pittsburgh djbpitt+@pitt.edu http://clover.slavic.pitt.edu/~djb/ Slavic Digital Text Workshop University of Illinois at Urbana-Champaign 2005-07-06
2
How to Set up an XML Project Examples (critical edition of Igor′ Tale) Document instance (main XML file) –XML Declaration –Doctype Declaration –Data with markup Document Type Definition (DTD) –Elements –Attributes Transformation Stylesheets (XSLT) Target files (HTML) Cascading Style Sheets (CSS) Batch file
3
The XML Declaration
4
Doctype Declaration
5
Document Type Definition
6
What the Instance Looks Like Title goes here Heading goes here Paragraph text goes here
7
Non-Empty and Empty Elements Element content … Character data (#PCDATA) content blah, blah, blah Mixed content blah … blah Some elements are empty
8
Element Declarations 1 Examples Element name and content model #PCDATA = parsed character data (plain text) blah blah blah …
9
Element Declarations 2 Examples Connectors –Sequence (,) –Any order (|)
10
Element Declarations 3 Examples Repetition –Exactly one (no repetition indicator) –Zero or one (?) –One or more (+) –Zero or more (*)
11
Attribute Declarations Example Element name, attribute name, token list, default пѣснь
12
Document Type Declaration
13
The Document Instance аще кому хотяше пѣснь пѣснѣ творити,
14
XSLT Extensible Stylesheet Language for Transformations Can rearrange elements (unlike other stylesheet strategies) Programming language for manipulating XML Use XSLT transformation engine to generate HTML from XML
15
HTML Hypertext Markup Language Why not just create HTML in the first place? –XML easier to edit and maintain –XML supports multiple output formats from single source
16
CSS Cascading Stylesheets –External stylesheet –Internal style commands “Decorate the tree” Cannot rearrange elements Likh: трудныхъ повѣстий (4) о пълку Игоревѣ, P: трудныхъ повѣстий о полку Игоревѣ, K: трудныхъ повѣстий о полку Игоревѣ, (4) ПОЛКУ
17
Batch File saxon -o igor.html igor.xml score.xsl saxon -o commentary.html igor.xml commentary.xsl saxon -o igor1.html igor.xml igor.xsl saxon -o variants.html igor.xml variants.xsl
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.