Closed prlbr closed 9 years ago
Ah yes thank you. Will change LANG to TYPE. Not sure why I typed in LANG (wanted it to be equivalent to <SCRIPT type="text/javascript">
)
As for class, I agree it should be changed. I wanted it to be an equivalent to an TABLE, will pick something besides class.
I would also suggest to use some caution with "type" attribute. Though not global, it is usually associated with MIME types, such as on <script>, <object> etc. It is a matter of language consistency.
Changed the <FIXTURES TYPE>
parameter to be "application/json"
to be MIME compliant.
And changed the <MODEL CLASS>
attribute to <MODEL NAME>
You still use <main@class=viewer>
and <menu@class=controller>
at the end of Example 1. There's nothing bad in this case, as class can somehow suggest the element's function. Just note that @class
is not an enumerated attribute (i.e. you yourself should list the values you are interested in) and pay attention that those values are not used in other elements/contexts, neither initially nor by browser extensions and so on.
Or you could use a brand-new element for every purpose:
<control base="http://api.mywebsite.com/">
could be nested inside <menu>
or nav
so that all items inside it could just specify the parameter to send when calling api.mywebsite.com interface (<a mref="article-2">
).<view>
inside elements whose role in the MVC structure is "viewer". Optionally it could be <view data="myArticleData.rsp">
and elements nested inside could have a shorter @model
attribute value, such as <h1 model="article(label='two').headline">
(it would shorten model values but it would require separate <view>
elements for different data sources - suit yourself according to the project).Also note that <article class="sidebar">
makes really poor syntax, as it would be better rendered by <aside>
element IMHO.
Andrea, I think the classes in the "main" and "menu" elements don't have any special meaning in the example. I suppose they were just included as explanation and could be used for styling purposes for example. But they could be left away, too. They are not significant. That's why I already closed this issue. But it can be re-opened if I'm missing something here.
Currently, the attribute "lang" is used on the "fixture" element with an example value of "json". This is wrong, because "lang" is a global attribute in HTML whose value must be a BCP 47 language tag. BCP 47 "excludes languages not intended primarily for human communication, such as programming languages" (quoted from BCP 47). Another attribute name should be chosen.
The attribute "class", currently used on the "model" element, is also a global attribute in HTML. Please check whether this causes conflicts with its intended use here as well.
https://html.spec.whatwg.org/multipage/dom.html#the-lang-and-xml:lang-attributes http://www.ietf.org/rfc/bcp/bcp47.txt https://html.spec.whatwg.org/multipage/dom.html#classes