XSLT 3.0 Packages Michael H. Kay. XSLT 3.0 Themes Streaming –support for large documents Packaging –support for large (sets of) stylesheets Maps –support.

Slides:



Advertisements
Similar presentations
CS 211 Inheritance AAA.
Advertisements

CSE 1302 Lecture 8 Inheritance Richard Gesick Figures from Deitel, “Visual C#”, Pearson.
Inheritance Inheritance Reserved word protected Reserved word super
ITEC200 – Week03 Inheritance and Class Hierarchies.
1 Inheritance Reserved word protected Reserved word super Overriding methods Class Hierarchies Reading for this lecture: L&L 8.1 – 8.5.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
XSL Transformations (XSLT) Meghasyam Bokam April’1 st, 2002.
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Object-oriented Programming Concepts
 2006 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
Inheritance. © 2004 Pearson Addison-Wesley. All rights reserved 8-2 Inheritance Inheritance is a fundamental object-oriented design technique used to.
Object Based Programming. Summary Slide  Instantiating An Object  Encapsulation  Inheritance  Polymorphism –Overriding Methods –Overloading vs. Overriding.
OOPs Object oriented programming. Based on ADT principles  Representation of type and operations in a single unit  Available for other units to create.
Lecture 8 Inheritance Richard Gesick. 2 OBJECTIVES How inheritance promotes software reusability. The concepts of base classes and derived classes. To.
An Object-Oriented Approach to Programming Logic and Design
Inheritance and Class Hierarchies Ellen Walker CPSC 201 Data Structures Hiram College.
Programming in Java Unit 2. Class and variable declaration A class is best thought of as a template from which objects are created. You can create many.
CSE3201/CSE4500 Information Retrieval Systems XSLT – Part 2.
Features of Object Oriented Programming Lec.4. ABSTRACTION AND ENCAPSULATION Computer programs can be very complex, perhaps the most complicated artifact.
CITA 330 Section 6 XSLT. Transforming XML Documents to XHTML Documents XSLT is an XML dialect which is declared under namespace "
CS200 Algorithms and Data StructuresColorado State University Part 4. Advanced Java Topics Instructor: Sangmi Pallickara
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 13 Introduction to Classes.
Copyright 2004 Scott/Jones Publishing Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 7 Structured Data and Classes.
CSE 341, S. Tanimoto Java brief review - 1 Java Brief Review Java’s strengths Object-oriented terminology Inheritance Interfaces An example with inheritance.
Summing Up Object Oriented Design. Four Major Components: Abstraction modeling real-life entities by essential information only Encapsulation clustering.
Inheritance. Inheritance is a fundamental object-oriented design technique used to create and organize reusable classes Chapter 8 focuses on: deriving.
1 Copyright (c) [2000]. Roger L. Costello. All Rights Reserved. Using XSLT and XPath to Transform XML Documents Roger L. Costello XML Technologies.
Object-Oriented Programming Chapter Chapter
Chapter 8 Specialization aka Inheritance. 2 Inheritance  Review of class relationships  Uses – One class uses the services of another class, either.
OOPs Object oriented programming. Abstract data types  Representationof type and operations in a single unit  Available for other units to create variables.
David Orchard W3C Lead BEA Systems Web service and XML Extensibility and Versioning.
Final Review. From ArrayLists to Arrays The ArrayList : used to organize a list of objects –It is a class in the Java API –the ArrayList class uses an.
ISBN Object-Oriented Programming Chapter Chapter
CSE3201/CSE4500 Information Retrieval Systems XSLT – Part 2.
Coming up: Inheritance
MNP1163/MANP1163 (Software Construction).  Minimizing complexity  Anticipating change  Constructing for verification  Reuse  Standards in software.
1 Inheritance Reserved word protected Reserved word super Overriding methods Class Hierarchies Reading for this lecture: L&L 9.1 – 9.4.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 12 Separate Compilation and Namespaces.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Java Programming, Second Edition Chapter Twelve Advanced Inheritance Concepts.
Inheritance and Class Hierarchies Chapter 3. Chapter Objectives  To understand inheritance and how it facilitates code reuse  To understand how Java.
Terms and Rules II Professor Evan Korth New York University (All rights reserved)
Author: DoanNX Time: 45’.  OOP concepts  OOP in Java.
Thread-Specific Storage (TSS) Chris Gill and Venkita Subramonian E81 CSE 532S: Advanced Multi-Paradigm Software Development.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Outline Creating Subclasses Overriding Methods Class Hierarchies Inheritance.
Why Learn Android? Largest installation base of any operating system Over 20,000 Android devices exist Businesses will likely move more to device-based.
1 XML and XML in DLESE Katy Ginger November 2003.
Introduction to Object-oriented Programming
Object-Oriented Programming
Object-Oriented Programming Concepts
Names and Attributes Names are a key programming language feature
Chapter 16 UML Class Diagrams.
Chapter 9 :: Data Abstraction and Object Orientation
Using XSLT and XPath to Transform XML Documents
Inheritance Modern object-oriented (OO) programming languages provide 3 capabilities: encapsulation inheritance polymorphism which can improve the design,
An Introduction to Inheritance
Copyright © 2009 Elsevier Chapter 9 :: Data Abstraction and Object Orientation Programming Language Pragmatics Michael L. Scott.
Lecture 9 Concepts of Programming Languages
Names, Binding, and Scope
Separate Compilation and Namespaces
Lecture 22 Inheritance Richard Gesick.
Advanced Java Topics Chapter 9
Advanced Java Programming
More Object-Oriented Programming
Analysis models and design models
Overriding Methods & Class Hierarchies
Fundaments of Game Design
Jim Fawcett CSE687 – Object Oriented Design Spring 2014
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
Lecture 9 Concepts of Programming Languages
Presentation transcript:

XSLT 3.0 Packages Michael H. Kay

XSLT 3.0 Themes Streaming –support for large documents Packaging –support for large (sets of) stylesheets Maps –support for complex data structures

Why are XSLT packages needed? DocBook –230K lines, 357 modules QTspecs –88K lines, 238 modules DITA Open Toolkit –75K lines, 255 modules TEI –101K lines, 313 modules A scientific publishing platform –100K lines, 120 modules 3

Potential benefits Software engineering benefits –Information hiding / abstraction –Easier debugging –Better potential for change –Greater reuse Commercial benefits –Ability to distribute libraries without revealing source code Performance benefits –Separate compilation of modules –Memory savings 4

Limitations of xsl:include / xsl:import Everything is global –makes change difficult –can't "black-box" a stylesheet e.g. to create a pipeline controlled from XSLT No constraints on overriding –signature may be incompatible Can't override one component in two different ways Very difficult to find anything in the source code 5

Separate Compilation To compile a module you need to know about its dependencies –e.g. types of variables and functions With xsl:import / xsl:include: –there may be a call to a function (or template or variable) that's not declared –if there is a declaration, it can be overridden in arbitrary ways 6

Terminology Package –A collection of stylesheet modules linked using xsl:include and xsl:import Component –A named template, named mode, function, global variable, attribute set etc Symbolic Reference –A call-template, function call, variable reference etc P uses Q –Package P contains symbolic references to components declared in Package Q

Component Visibility Components can be declared: –public (visible and overridable in a using package) –private (not visible, not overridable) –final (visible but not overridable) –abstract (visible, must be overridden) Visibility can be: –explicit –defaulted at package level

Package Manifest xsl:package element –defines package name and version –defines dependencies on used packages including optional overrides –links to, or contains top-level xsl:stylesheet module –defines what it exposes to using packages (its public interface) – xsl:expose

example

Overriding Named Components Component must be public or abstract Signature must be compatible Overriding component is private to the using package –unless exposed Overriding declaration must appear within xsl:override element in the package manifest Overriding component can invoke the overridden component using xsl:original

Component Binding A (public) B (private) C (abstract) Package Q A (private) B (hidden) C (private) Package P uses exposesoverrides

Multiple overrides A (public) B (private) C (abstract) Package B A1A1 B1B1 C1C1 P uses exposesoverrides A2A2 B2B2 C2C2 Q uses

Template Rules and Packages Template Rules belong to a mode Default mode can be defined for a module A mode has visibility: –private: templates can't be invoked from using package –final: templates can be invoked but can't be overridden –public: templates can be invoked and overridden

Other Declarations Keys, decimal formats, and namespace aliases are local to a package xsl:strip-space and xsl:preserve- space are local to a package (affect doc() calls in that package) xsl:output is local to a package (affects xsl:result-document calls in that package) stylesheet parameters (xsl:param) must be public (but can be overridden by a private xsl:variable in a using package)

Conclusion XSLT 3.0 Packages –software engineering quality –code reuse –ease of debugging –IP protection –reduce compilation overhead 16