Aptana Studio 3 - Warnings when using data-role Tags of HTML 5
Asked Answered
F

6

19

I want to use Aptana Studio 3 for developing jquery-mobile projects. Since jquery-mobile uses HTML5 I have to use tag attributes like "data-role="header" which is OK for HTML5.

For example:

<div data-role="header"></div>

But Aptana gives me warnings like:

unknown attribute "data-role"

How can I fix this, or is it an Aptana Studio 3 bug?

Fantan answered 21/10, 2011 at 9:42 Comment(0)
D
13

It more of a missing feature than a bug.

In Preferences > Aptana Studio > Validation you can define regular expression that match to errors/warnings you want to be ignored.

.*data-role.* should do it.

Dercy answered 21/10, 2011 at 13:3 Comment(3)
Hmm, I tried this and don't think I have the RegEx correct. Tried: data-* and data-role=[\"\"]*[\"\"] both didn't work. Any suggestions as I like this and wanted to implement itSeville
Thanks! Did change it to .*data-.* (catch all). Is the .* special syntax? or I should say the dot? +1 as it works greatSeville
Unfortunately you can't define regex filters for the HTML Tidy Validator, which is the validator that is generating these warnings.Patten
G
41

I performed below and it resolved the problem.

In Preferences > Aptana Studio > Validation > HTML Tidy Validator > Attributes >> Proprietary attributes --> ignore

Grandstand answered 19/3, 2013 at 20:4 Comment(2)
Confirmed for Aptana Studio 3, build: 3.4.1.201306062137Bodyguard
to me was working only turning off HTML Tidy ValidatorFlawed
D
13

It more of a missing feature than a bug.

In Preferences > Aptana Studio > Validation you can define regular expression that match to errors/warnings you want to be ignored.

.*data-role.* should do it.

Dercy answered 21/10, 2011 at 13:3 Comment(3)
Hmm, I tried this and don't think I have the RegEx correct. Tried: data-* and data-role=[\"\"]*[\"\"] both didn't work. Any suggestions as I like this and wanted to implement itSeville
Thanks! Did change it to .*data-.* (catch all). Is the .* special syntax? or I should say the dot? +1 as it works greatSeville
Unfortunately you can't define regex filters for the HTML Tidy Validator, which is the validator that is generating these warnings.Patten
A
11

This had bugged me for months. I tried the solutions above but they didn't work. What did work for me was turning off HTML Tidy Validator in Aptana 3.2.2.

Preferences -> Aptana Studio -> Validation -> HTML

And then turn off HTML Tidy Validator for build and reconciliation.

Adulterine answered 19/9, 2012 at 11:50 Comment(0)
E
0

Seems to it doesnt support for this, I went through Wikipedia and their doc. So we have to bear this until plug-in comes.

Eddins answered 21/10, 2011 at 10:16 Comment(0)
C
0

Late response but I found this thread while searching to resolve the same issue, tried the regex solution, which didn't work for me, so came up with this solution, which is at least less drastic than disabling HTML Tidy Validator:

Window > Preferences > Aptana Studio > Validation > HTML Tidy Validator

  • Change Attributes > Proprietary Attributes from Warning to either Ignore or Info.

There are several other frameworks other than jQuery Mobile (Angular for example) where the use of custom attributes is common, so I don't think this is a bad thing to do, as I don't know of any browser that breaks with custom attributes, they just get ignored.

While you're changing HTML Tidy Validator, I'd also recommend removing the warning for elements with no content as often folks populate those through JavaScript. You can do so like this:

  • Change Elements > Trim Empty Elements from Warning to either Ignore or Info.
Chlo answered 13/9, 2014 at 23:50 Comment(0)
F
0

The correct path to resolve the "unrecognized" issue for my build is: Window > Preferences > Aptana Studio > Validation > HTML Tidy Validator > Elements > Unrecognized elements > Ignore

Fidelafidelas answered 6/5, 2015 at 15:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.