Home / XSL

XSL

Introduction to XSL

Evolution of XML What is XML? The eXtensible Markup Language (XML) is a general-purpose markup language. Its primary purpose is to facilitate the sharing of data across different information systems, particularly via …

Read More »

Overview of XSL Transformations

Overview of XSL Transformations In an XSL transformation, an XSLT processor reads both an XML document and an XSLT style sheet. Based on the instructions the processor finds in the XSLT style sheet, it outputs a new XML document or fragment thereof. …

Read More »

XSL output methods

Options for displaying XML  XSL output methods <xsl:output cdata-section-elements="namelist" doctype-public="string" doctype-system="string" encoding="string" indent="yes" | "no" media-type="mimetype" method="html" | "name" | "text" | "xml" omit-xml-declaration="yes" | "no" standalone="yes" | "no" version="version_number" /> …

Read More »

What’s with Stylesheets in the first place?

We can even use CSS to format XML, but as we know CSS is designed to format HTML not XML (meta languages) and XML is not like HTML. XML is related with data whereas HTML is used for presentation of the information on the internet. How …

Read More »

What Does a Stylesheet Do?

A stylesheet specifies the presentation of XML information using two basic categories of techniques: • An optional transformation of the input document into another structure • A description of how to present …

Read More »

Transformation capabilities

Transformation capabilities include: • generation of constant text • suppression of content • moving text (e.g., exchanging the order of the first and last name) • duplicating text (e.g., copying …

Read More »

The components of the XSL

The components of the XSL The full XSL language logically consists of three component languages which are described in three W3C (World Wide Web Consortium) Recommendations: XPath:  XML Path Language–a language for referencing specific parts …

Read More »

XSL vs. HTML Formatting Objects

XSL is a W3C Recommendation XSL or CSS is essential for XML presentation and XSL far more powerful and complicated than CSS. XSL permits : • element reordering • selection of source elements • text generation • processing source elements multiple times …

Read More »

The Structure of a Stylesheet

The Structure of a Stylesheet • XSLT Stylesheets are XML documents; namespaces (http://www.w3.org/TR/REC-xml-names) are used to identify semantically significant elements. • Most stylesheets are stand-alone documents rooted at <xsl:stylesheet> or <xsl:transform>. It is possible to have …

Read More »

Match Patterns (Locating Elements)

Match Patterns (Locating Elements) One critical capability of a stylesheet language is to locate source elements to be styled. CSS, for example, does this with “selectors.” FOSIs do it with “e-i-c’s”, elements in …

Read More »

More Complex Patterns

section/*/note Matches <note> elements that have <section> grandparents. stockquote[@symbol] Matches <stockquote> elements that have a “symbol” attribute stockquote[@symbol=”XXXX”] Matches <stockquote> elements that have a “symbol” attribute with the value “XXXX“ …

Read More »

Node Tests & Axis Specifiers

Node Tests & Axis Specifiers Node tests are most frequently element names, but other node tests are possible: name Matches <name> element nodes * Matches any element node namespace:name Matches …

Read More »

Applying Style

Applying Style One model for applying style is to allow the process to run recursively, driven primarily by the document. A series of templates is created, such that there is …

Read More »

Conflict Resolution

Conflict Resolution The problem of multiple patterns that match is handled by conflict resolution: • Matching templates from imported modules are not considered if there is a matching template in …

Read More »

Applying Style Procedurally

Applying Style Procedurally The other model for applying style is to select each action procedurally. A series of templates is created, such that each template explicitly selects and processes the …

Read More »