Re: [webcomponents] Use x:: instead of x-?

2012-05-10 Thread Simon Pieters
On Wed, 09 May 2012 22:25:29 +0200, Kornel Lesiński   
wrote:






Would it be possible to use "::" instead of the "x-" prefix in custom  
element names? i.e. allow any name as long as it contains "::" somewhere:





This isn't namespace-well-formed XML.


or




1. The "::" is used for pseudo-elements in CSS, and for namespaces in  
C++, both of which seem somewhat related.


This means that you can't target it without escaping in selectors.

foo\:\:bar

2. "x-" is (subjectively) ugly, and has been used for experimental  
extensions elsewhere. IMHO it's a bit of an eye-sore in the otherwise  
elegant design.


I agree that "x-" is not awesome.


3. document.createElement('::foo') works.


With createElementNS it doesn't.


 parses (unfortunately <::foo> doesn't).


Use of "::" would naturally allow some namespacing of reusable  
components:





(not True Namespaces in the XML sense, but IMHO that's also a good  
thing). If I understand correctly, serialisation of "::" in XML isn't a  
problem, as XML documents could use the is="" attribute instead.


This violates the DOM Consistency design principle.

The colon in element and attribute names is trouble. We should try hard to  
avoid it.


--
Simon Pieters
Opera Software



[webcomponents] Use x:: instead of x-?

2012-05-09 Thread Kornel Lesiński




Would it be possible to use "::" instead of the "x-" prefix in custom  
element names? i.e. allow any name as long as it contains "::" somewhere:




or




1. The "::" is used for pseudo-elements in CSS, and for namespaces in C++,  
both of which seem somewhat related.


2. "x-" is (subjectively) ugly, and has been used for experimental  
extensions elsewhere. IMHO it's a bit of an eye-sore in the otherwise  
elegant design.


3. document.createElement('::foo') works.  parses (unfortunately  
<::foo> doesn't).



Use of "::" would naturally allow some namespacing of reusable components:




(not True Namespaces in the XML sense, but IMHO that's also a good thing).  
If I understand correctly, serialisation of "::" in XML isn't a problem,  
as XML documents could use the is="" attribute instead.


--
regards, Kornel Lesiński