Presentation is loading. Please wait.

Presentation is loading. Please wait.

XML technologies for text encoding Tamás Váradi

Similar presentations


Presentation on theme: "XML technologies for text encoding Tamás Váradi"— Presentation transcript:

1 XML technologies for text encoding Tamás Váradi varadi@nytud.hu

2 BTANT129 w42 Introduction Processing XML files –CSS – getting the picture right –XPATH – Finding our way around –XSLT extracting the right info Encoding content the right way –Text Encoding Initiative –TEI Lite Tools

3 BTANT129 w43 Benefits of XML makes structure and content clear encoding independent of display and device portable, platform independent ideal for exchange of data with a DTD, validation of document is easy

4 BTANT129 w44 Limitations of XML Verbose annotation increases the size of the files (sometimes hugely) Not very efficient format for fast access and recall

5 BTANT129 w45 Displaying XML files? Style sheets –consistent design –easy to change –one stylesheet can serve many XML documents –one documents can use different stylesheets

6 BTANT129 w46 Cascading Stylesheets h1: { font-size: 3em; } Elements are associated with display styles selectorproperty value A Stylesheet is a collections of style rules

7 BTANT129 w47 Declaring the stylesheet <?xml-stylesheet type = "text/css" href = "url-of-stylesheet" ?>

8 BTANT129 w48 An example Load the file letter.xml into Internet Explorer Now load the file letter2.xml View source Open the file letter.css in notepad Check that what you see corresponds to what is in the css file

9 BTANT129 w49 Cascading stylesheets Features are inherited down the XML tree Three levels of applying styles: 1.External stylesheets 2.Internal style definitions 3.Inline style settings

10 BTANT129 w410 Limitations of CSS Elements are formatted in their original sequence No means to reorder elements No means to select a set of elements

11 BTANT129 w411 More advanced techniques XSL – Extensible stylesheet Language XSLT – XSL with Transformations XPath – a standard way to find elements in the XML hierarchy

12 BTANT129 w412 XSLT See the excellent introduction to XSLT by Sebastian Rahtz available herehere

13 BTANT129 w413 Standard annotation of content XML is an annotation standard it is not designed for any particular domain Need for standard way of encoding typical text genres like books, dictionaries, letters, radio news etc. etc. => TEXT ENCODING INITIATIVES (TEI)


Download ppt "XML technologies for text encoding Tamás Váradi"

Similar presentations


Ads by Google