• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 20. SVG and XSLT > XSLT Overview

XSLT Overview

So far in this book, we have looked at creating SVG using procedural and object-oriented techniques. A great many operations, however, can be carried out in a far more straightforward fashion by moving away from the more familiar programming paradigms. XSLT is a declarative language, based on rules rather than objects or functions. Though powerful, it is essentially a very simple language, but after you learn other languages, it can be difficult to grasp at first because of the paradigm shift. The initial steep climb is very much worthwhile, though, because XSLT offers very neat solutions to a vast number of common problems.

Declarative Languages

Nowadays the database language SQL is probably the best-known example of a declarative language, though functional languages such as Lisp and logic languages such as Prolog also fall into this category. Within such languages, we don't write dozens of lines of procedure that describe how to get a result; we just state the result we want and let the processor do the work. In SQL we might make a statement to, say, add a bonus $100 to the salaries of all employees who have a birthday in January. Once given the statement, the database system will just go away and carry out the operation, hiding the internal details of how it does its work.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint