On 2010-06-10, at 16:35, P T Withington wrote: > On 2010-05-26, at 17:42, P T Withington wrote: > > [...] > >> I propose then that we distinguish the types `text` and `html` from >> `string`, and that we permit them on any attribute (not just on an attribute >> named "text": although it is by defining an attribute named text that you >> tell the schema that your class defines a tag that permits content, you >> might want other attributes with these types). I propose the following >> semantics: >> >> string: Value is parsed as an ECMAScript string >> text: Value is parsed as XML CDATA >> html: Value is parsed as XML content > > There's one issue with my proposal: > > Currently, LZX treats string, text, and html as synonyms. They are close, > but if we distinguish them as above, they are clearly not, if you have any ES > or XML characters that would be escaped. > > I tried making the declared type of <text>'s text field be honest (it is > really `html`, because it is not quoted in any way), and run into lots of > compiler type warnings because in lots of places, components and demos have > created subclasses of text, or simply initialized the text attribute and have > (pointlessly) re-declared the type of the text field. > > I don't have a solution other than removing the declarations from the > components and demos as we come across them. > > Other opinions?
Or, maybe I am wrong. Maybe the intent is that <text> is of type `text`, that it does _not_ interpret HTML? But I think it does, since we seem to allow simple markup in text, right?
