Subject: RE: [xsl] Is it possible to get " " in output rather than the encoded character? From: "Passin, Tom" <tpassin@xxxxxxxxxxxx> Date: Wed, 19 May 2004 17:44:48 -0400 |
> From: Steven Reddie [mailto:smr@xxxxxxxxxxxxxx] > Sorry, I wasn't being accurate. I meant is it reasonable to > expect   to be left as   when outputting us-ascii. > This is obviously the same as expecting the two consecutive > bytes 0xC2 0xA0 in a utf-8 input stream to be translated to >   for a us-ascii output stream. I don't see anything > wrong with such an expectation. > What you haven't absorbed yet is that there is nothing to be "left as & # 1 6 0 ;". When that xml parser parses the xml file and encounters such a character, it sticks a unicode non-breaking space into the text that it constructs. Later, the xslt processor receives that text and has no way to know that it startedout in life as & # 1 6 0 ;, & n b s p;, or whatever it was. So when the xslt transformation is done and gets handed off to the serializer, there is no memory of the original source of that character (and how could there be, really - after all, you might have added the character during the transformation). So the serializer has to figure out what to output,and if the encoding does not support a character, how to escape it. The easiest and most reliable thing to do is output an & # x 0 0 ; or & # x 0 0 0 0 ; character reference,so that is what you usually get. The above is what is "reasonable" to expect - output that character if the encoding supports it, output an appropriate character reference if not, and oh, yes, if you are lucky maybe output the corresponding html entity or maybe not. Any other behavior is nonconforming and incorrect. Cheers, Tom P
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Is it possible to get "&n, Steven Reddie | Thread | RE: [xsl] Is it possible to get "&n, Steven Reddie |
[xsl] RE: Subject: RE: [xsl] multip, Robert Stukey | Date | Re: [xsl] attributes to nested elem, Tim Lord |
Month |