-
1. Re: CDK templates and XML validation (data-* and aria-*)
paul.dijou Aug 5, 2012 6:31 PM (in response to lfryc)I guess I would go with option 2). You are talking about "data-*" attributes, but I think HTML5 is about allowing to use any kind of attributes. So maybe we can found "whateveryouwant" attribute used by a jQuery UI plugin tomorrow for example. We are writing HTML more than XML, isn't it?
By the way, I don't know if it's about XML validation or my personnal settings on Eclipse, but I also got errors around wildcards:
Description Resource Path Location Type cvc-attribute.3: The value 'on*' of attribute 'cdk:passThrough' on element 'a' is not valid with respect to its type, 'null'. buttonDropdown.template.xml /bootstrap-ui/src/main/templates/org/richfaces/bootstrap line 19 XML Problem And using c:forEach inside a ul since the validator was looking for a li:
Description Resource Path Location Type cvc-complex-type.2.4.a: Invalid content was found starting with element 'c:forEach'. One of '{"http://jboss.org/schema/richfaces/cdk/xhtml-el":li, "http://jboss.org/schema/richfaces/cdk/core":body, "http://jboss.org/schema/richfaces/cdk/jstl/core":if, "http://jboss.org/schema/richfaces/cdk/jstl/core":choose, "http://jboss.org/schema/richfaces/cdk/core":call, "http://jboss.org/schema/richfaces/cdk/core":switch, "http://jboss.org/schema/richfaces/cdk/core":object}' is expected. commandButton.template.xml /bootstrap-ui/src/main/templates/org/richfaces/bootstrap line 120 XML Problem Fragments causing problems since they were not specified as child of the root element:
Description Resource Path Location Type cvc-complex-type.2.4.d: Invalid content was found starting with element 'cdk:fragment'. No child element is expected at this point. commandButton.template.xml /bootstrap-ui/src/main/templates/org/richfaces/bootstrap line 29 XML Problem A few other ones:
Description Resource Path Location Type cvc-complex-type.3.2.2: Attribute 'cast' is not allowed to appear in element 'cdk:object'. blockquote.template.xml /bootstrap-ui/src/main/templates/org/richfaces/bootstrap line 22 XML Problem Description Resource Path Location Type cvc-complex-type.3.2.2: Attribute 'varStatus' is not allowed to appear in element 'c:forEach'. tabbable.template.xml /bootstrap-ui/src/main/templates/org/richfaces/bootstrap line 19 XML Problem -
2. Re: CDK templates and XML validation (data-* and aria-*)
lfryc Aug 6, 2012 5:15 AM (in response to paul.dijou)Paul Dijou wrote:
I guess I would go with option 2). You are talking about "data-*" attributes, but I think HTML5 is about allowing to use any kind of attributes. So maybe we can found "whateveryouwant" attribute used by a jQuery UI plugin tomorrow for example. We are writing HTML more than XML, isn't it?
I must agree here, just consider that validation is pretty handy CDK feature, which can avoid typos or misunderstandings.
CDK does not validate only enumeration of attributes but also their content where possible.
But I agree this is opposito to where HTML5 specs are going.
Paul Dijou wrote:
By the way, I don't know if it's about XML validation or my personnal settings on Eclipse, but I also got errors around wildcards:
...
/bootstrap-ui/src/main/templates/org/richfaces/bootstrap line 19 XML Problem And using c:forEach inside a ul since the validator was looking for a li:
...
Fragments causing problems since they were not specified as child of the root element:
...
A few other ones:
Yeah, those are ones I have fixed on develop, but right now, your IDE is validating gainst schemas uploaded to pernament location.
You can import catalog.xml which imports development versions of schemas:
From Eclipse - File > Import > XML Catalog