[
Lists Home |
Date Index |
Thread Index
]
> From: Michael Rys [mailto:mrys@microsoft.com]
> Sent: Wednesday, December 19, 2001 7:15 PM
> To: MURATA Makoto; xml-dev@lists.xml.org
> Subject: RE: [xml-dev] Some comments on the 1.1 draft
>
>
> The normalization of CR, LF and CRLF can be avoided by using their
> character entities. So I still can preserve fidelity.
I don't think this is true. For instance, using MSXSL, try:
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
>
<xsl:output encoding="UTF-8" />
<xsl:template match="/">
<html>
<head>
</head>
<body>
<p>
carriage return:
line feed:
</p>
</body>
</html>
</xsl:template>
</xsl:transform>
The result is:
0000000 < h t m l > \r \n < h e a d > \r \n
683c 6d74 3e6c 0a0d 683c 6165 3e64 0a0d
0000020 < M E T A h t t p - e q u i v
4d3c 5445 2041 7468 7074 652d 7571 7669
0000040 = " C o n t e n t - T y p e "
223d 6f43 746e 6e65 2d74 7954 6570 2022
0000060 c o n t e n t = " t e x t / h t
6f63 746e 6e65 3d74 7422 7865 2f74 7468
0000100 m l ; c h a r s e t = U T F -
6c6d 203b 6863 7261 6573 3d74 5455 2d46
0000120 8 " > \r \n < / h e a d > \r \n < b
2238 0d3e 3c0a 682f 6165 3e64 0a0d 623c
0000140 o d y > \r \n < p > \r \n
646f 3e79 0a0d 703c 0d3e 200a 2020 2020
0000160 c a r r i a g e r e t u r n
6320 7261 6972 6761 2065 6572 7574 6e72
0000200 : \r \n \r \n l i n e
203a 0a0d 0a0d 2020 2020 2020 696c 656e
0000220 f e e d : \r \n \r \n <
6620 6565 3a64 0d20 0d0a 200a 2020 3c20
0000240 / p > \r \n < / b o d y > \r \n < /
702f 0d3e 3c0a 622f 646f 3e79 0a0d 2f3c
0000260 h t m l > \r \n \0
7468 6c6d 0d3e 000a
0000267
So it doesn't matter how you put it into the source, it will be normalized
to a "default" line end anyway.
Julian
|