Line-ending issues

Line endings in ASCII text files have no relevance in XML, but in many formats they are very important. For example, in the TROFF (Text RunOFF) format, each formatting command must appear at the start of a text line. Line-end characters can be inserted into the output using XML character entity references. On Macintosh systems, the character Carriage Return (ASCII value 13) is used. On Unix sytems, it is the character Line Feed (ASCII value 10). On MS-DOS-based systems, both characters are used, in the sequence Carriage Return followed by Line Feed. But, depending on the parser underlying the stylesheet processor, either character alone may produce the platform-specific outcome required (so this needs testing). The following ...

Get XSL companion, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.