Skip to Content
Special Edition Using XML, Second Edition
book

Special Edition Using XML, Second Edition

by - et al. David Gulbransen
July 2002
Intermediate to advanced
864 pages
22h 32m
English
Que
Content preview from Special Edition Using XML, Second Edition

Using CSS Formatting with XML

Now that you have seen how CSS rules are formed and are familiar with some of the properties and values that you can manipulate to influence how your elements are displayed, we can look at an example of an XML document formatted with CSS.

Listing 7.1 shows a newspaper.xml document which we are going to format for display with CSS. This document is a regular, well-formed XML document, with only one special line, which is immediately following the XML Declaration. That line is

<?xml-stylesheet type="text/css" href="newspaper.css"?> 

This line is a processing instruction, which is used to link our stylesheet to the XML document. It has two attributes, one of which is type that is used to specify the type of stylesheet ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

XML Pocket Reference, 3rd Edition

XML Pocket Reference, 3rd Edition

Simon St. Laurent, Michael Fitzgerald
Essential XML: Beyond Markup

Essential XML: Beyond Markup

Don Box, Aaron Skonnard, John Lam

Publisher Resources

ISBN: 078972748XPurchase book