Style tables XSL
In the previous section we applied to a conclusion of elements of the XML-document to the screen of a browser Java Script-scripts However as it was already marked, it is more preferable to these purposes use specially intended for this means - than style tables XSL (Extensible Stylesheet Language).
Style tables (style sheets) it is accepted to name the special instructions managing process of display of an element in a window of the program - client (for example, in a window of a browser). Offered{suggested} in quality recommendation W3C, cascade style tables (CSS-Cascading Style Sheets) more year are used by Web-developers for registration of Web-pages.
Support CSS by the most known browsers for today Opera and Microsoft Internet Explorer (since version 3.0) and Mozilla Firefox has allowed to use style tables for the decision of the widest spectrum of problems{tasks} - from registration of a homepage before creation of the large corporate Web-site. The word cascade in definition CSS means an opportunity of association of separate elements of formatting by the enclosed descriptions of style. For example, the attributes of the text set in a tag <body>, will be distributed to the enclosed tags until in them there will be no the style descriptions cancelling or supplementing the current parameters. Thus, use of tables CSS in HTML was rather effective - disappeared necessity of the obvious task of tags of formatting for each of elements of the document.
Being very powerful means of registration of HTML-pages, CSS-tables, nevertheless, cannot be applied in XML-documents since the set of tags in this language is not limited also use of static links to formatted objects of the document in this case it is impossible.
Therefore for formatting XML-elements the modern language of a marking being subset XML has been developed, and has specially been intended for formatting XML-elements.
His{Its} some differences from CSS:
First, style tables XSL allow to define{determine} registration of an element depending on his{its} site inside the document, i.e. to two elements with the identical name various rules of formatting can be applied.
Second, the language, underlying XSL, is XML, and it means, that XSL is more flexible, is universal and developers have an opportunity of use of means for the control over a correctness of drawing up of such style lists (using DTD or circuits of the data)
Thirdly, tables XSL are not cascade, is similar CSS since extremely difficultly to provide "kaskadiruemost`" style descriptions, or, in other words, the opportunity of association of separate elements of formatting by the enclosed descriptions of style, in a situation when the structure of the target document is beforehand unknown also he is created during the analysis. However in XSL there is an opportunity to set a rule for styles by means of which it is possible to change properties of style registration that allows to use rather complex{difficult} receptions of formatting
At the moment language XSL is at a stage of development in W3C [3] and in the future, probably, becomes a part of standard XML. It means, that use of this mechanism is the most perspective way of registration of XML-documents. In current working variant W3C, XSL it is considered{examined} not only as a markup language determining style tables - in him{it} the means necessary for performance of actions on kill of the information, deduced{removed} in a window of the client, search of elements, the complex{difficult} search based on dependences between elements, etc. are incorporated.
For today the unique browser supporting some from these opportunities, behta-version Internet Explorer 5.0, however in the near future, certainly is, XSL will be used also widely, as today standard tags HTML
In this section we shall consider the simplified objective model of the XSL-document used in the current version of XSL-converter Microsoft msxsl and consequently the information stated further, it is impossible to count the description of the language standard. The full working variant of specification XSL in his{its} last edition is accessible on the server.
All examples resulted{brought} further, can be checked up by means of the XSL-converter freely accessible on page Mcrosoft (www.microsoft.com/xml/xsl/)
With what to start
The principle of processing of XML-documents style tables consists in the following: at analysis of the XSL-document the program - analyzer processes instructions of this language and to each element found in a XML-tree puts in conformity a set of the tags determining formatting of this element. In other words, we set a pattern of formatting for XML-elements, and this pattern can have structure of a corresponding fragment of the XML-document. Instructions XSL define{determine} an exact site of element XML in a tree, therefore there is an opportunity to apply various styles of registration to identical elements, depending on a context of their use.
Generally, XSL allows the author to set parameters of display of element XML, using any languages intended for formatting - HTML, RTF, etc. In this section we shall use as such language HTML since the documents created by means of this language of a marking can be looked through by any suitable browser of Web-pages
Structure of XSL-tables
Let's consider the basic structural elements XSL used, in particular, in the converter msxsl, for creation of registration of XML-documents.

|