%xsldoc.ent; ]> $Id: normalize-scape.mod.xsl,v 1.33 2004/01/26 09:40:12 j-devenish Exp $ &ramon; &james; 2000200120022003 Ramon Casellas &rev_2003_05; Whitespace Normalization and Character Encoding <filename>normalize-scape.mod.xsl</filename> Normalize whitespace and and escape active &latex; characters. Includes the auto-generated scape.mod.xsl module. Process text() nodes Handles regular text content (i.e. #PCDATA) from &docbook; documents. &no_var; For most elements, &latex; active characters will be escaped using the template. However, for text within the following elements, the template will be used to typeset monospace text: literal, filename, userinput, systemitem, prompt, email, sgmltag. In all cases, interior whitespace will be normalised according to the XSLT specification with the additional feature that leading and trailing whitespace will be elided (as expected with SGML parsers). Process text() nodes Handles regular text content (i.e. #PCDATA) from &docbook; documents when they are forming the displayed text of an xref. &no_var; &latex; active characters will be escaped using the template. In all cases, interior whitespace will be normalised according to the XSLT specification with the additional feature that leading and trailing whitespace will be elided (as expected with SGML parsers). Process text() nodes Handles regular text content (i.e. #PCDATA) from &docbook; documents when they are forming the displayed text of an xref. &no_var; &latex; active characters will be escaped using the template. In all cases, interior whitespace will be normalised according to the XSLT specification with the additional feature that leading and trailing whitespace will be elided (as expected with SGML parsers). Process text() nodes Handles regular text content (i.e. #PCDATA) from &docbook; documents with they occur within certain verbatim-mode elements. When this variable is enabled, leading and trailing whitespace will be elided. Otherwise, all text is used verbatim. Unlike other text() templates, &latex; characters are not escaped by this template. This will result in invalid output in some instances. However, it is currently necessary for verbatim-mode support. Whitespace is neither normalised nor elided. Process text() nodes Handles URL text content from &docbook; documents. &no_var; This template is only used by and only when is disabled. &latex; active characters will be escaped or hyphenated in a fashion that is tailored for URLs via . Whitespace Normalization and Discretionary Elision This template is used by various text() templates to normalise interior whitespace and trim whitespace that occurs at the start or end of a &docbook; element's content. &no_var; string The text to be processed. The template is normally called when the context node is within a &docbook; document. The elision of leading or trailing whitespace is dependent on values of the XPath functions position() and last(). This is similar to the handling of whitespace by SGML parsers and allows authors to format their XML documents with pretty indentation without causing spurious whitespace in &latex;. In all cases, interiour whitespace will be normalised with the XPath normalize-space() function. This is necessary to prevent blank-line problems in &latex;. Process URL text Escapes or hyphenates &latex; active characters is URLs. &no_var; string The URL text to be processed. This template is called by . Text will be escaped and hyphenated by the template, except that any portion up to :// will not be treated specially. Character Escaping and Whitespace Normalization This template is used by various templates to escape &latex; active characters and to normalise whitespace. &no_var; string The text to be processed. This template will call the template and process its output with the XPath normalize-space function. Search-and-replace This template performs search-and-replace to modify all instances of a substring. &no_var; string The text to be searched. from The text (substring) to be replaced. to The text that replaces the from text. This template will search within the string text for all occurrences of from and replace them with the to text.