Re: [xsl] <&#220;belkeit/> - ASCIIfied element name (LibXSLT/xsltproc)

Subject: Re: [xsl] <&#220;belkeit/> - ASCIIfied element name (LibXSLT/xsltproc)
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Wed, 09 Jul 2008 17:23:48 +0200
Michael Kay wrote:

(By the way, do any of the SGML historians on the list know why character references are not allowed in element and attribute names? I expect the reason is just the usual one that committees are far more stupid than their individual members.)

I'm no SGML historian, not even close, but most languages do not allow certain characters in their keywords and identifiers and they don't allow them to be escaped either.


public class Quoted"Strange" {}

could be escaped as:

public class Quoted&quot;Strange&quot; {}

or:

public class Quoted\"Strange\" {}

.....
Point being: having identifiers not being escapable makes sense to me. I have always found it a bit unfortunate that more and more languages allow higher characters (above the US-ASCII range) to be used in identifiers, including XML, which begs for compatibility problems (I've opened German PHP sources in a text editor which showed the names of identifiers and text crippled because PHP does not have a clear way of stating the encoding).


Yet I can also understand the pints of the internationalization lobby... (using Chinese in your identifiers perhaps makes sense when you're from China, but don't expect everybody to be able to read your and understand your code)

-- Abel --

Current Thread