XSL Concepts and Practical Use

What's with stylesheets in the first place?
  • XML is not a fixed tag set (like HTML)
  • XML by itself has no (application) semantics
  • A generic XML processor has no idea what is "meant" by the XML
  • XML markup does not (usually) include formatting information
  • The information in an XML document may not be in the form in which it is desired to present it
  • Therefore there must be something in addition to the XML document that provides information on how to present or otherwise process the XML

Advantages to separating content from style
Contrary to when style information is hard-coded into the content, separation of style from content allows for the same data to be presented in different ways. This enables:

  • Reuse of fragments of data: the same content should look different in different contexts
  • Multiple output formats: different media (paper, online), different sizes (manuals, reports), different classes of output devices (workstations, hand-held devices)
  • Styles tailored to the reader's preference (e.g., accessibility): print size, color, simplified layout for audio readers
  • Standardized styles: corporate stylesheets can be applied to the content at any time
  • Freedom from style issues for content authors: technical writers needn't be concerned with layout issues because the correct style can be applied later

Click to Read More

Followers