Read XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition Online
Authors: Michael Kay
This is pretty pragmatic code, and it almost certainly doesn't handle all possible cases. In effect, it recognizes that the But the magic is in the As well as the There are a few other points to note about this stylesheet module. Firstly, it contains the declaration Secondly, the stylesheet has a template rule, about 50 lines long, for The presentation of this document has been augmented to identify changes from a previous version… REC-xml.xsl The third module in the stylesheet is called Looking through the contents of this stylesheet, most of it appears to be rather pragmatic. For example, it recognizes that an
diff
attribute can occur in three different contexts: contexts where a
element can be added to the HTML, contexts where a
element can be added to the HTML, and contexts where nothing can be done. In the first two cases, the
or
element is added, with a
class
attribute that will invoke a CSS rule to cause the text to be displayed with a background color.
or
element, the stylesheet should go on to process the element exactly as it would have done if the
diffspec.xsl
stylesheet module had not been invoked. The effect of this stylesheet module is thus entirely additive.
[@diff=“add”]
and
[@diff=“del”]
.
diffspec.xsl
module that could be used as an overlay over a variety of different base stylesheets? To achieve this, the module could not import the underlying module, which means it could not use
xmlspec-diff.xsl
, which imports both
xmlspec.xsl
and
diffspec.xsl
. Unfortunately, though, the rules for
REC-xml.xsl
. Compared with
xmlspec.xsl
, this module is rather poorly documented. The thinking is apparently that
xmlspec.xsl
should be a generic stylesheet that applies to all the W3C specifications (or at any rate, all those that are authored in XML), while
REC-xml.xsl
is a customization for the XML Recommendation in particular.
role
attribute with values such as
“2e”
,
“3e”
, and
“4e”
, and thus allows the published output to distinguish between authors of each edition of the specification. The
role
attribute is permitted on pretty well any element in the DTD, and has no defined values; a comment in the DTD makes it fairly clear that it is intended as a general-purpose extensibility mechanism to allow document editors to add information that can't otherwise be captured.Other books