Code completion for HTML without XHTML namespace

Hi,
in JSPX if I skip xmlns="http://www.w3.org/1999/xhtml" I loose code completion for HTML tags.
Logically this is right but this is common case when people use XHTML tags in JSPX but this is not valid XHTML. For example I use custom tags a lot and some of them generate some HTML tags, so output is valid XHTML. If I set xmlns in my JSPX many XHTML tags will be highlighted as an error.
So I have dilemma or have errors highlighted in my JSPX or loose completion. I was thinking if somehow you could leave code completion for tags like HTML even if I skip xmlns attribute. You have something like that for CSS in style attribute. No matter where I have the attribute style (even in my custom tags) I have code completion, which is very handy.
What do you think? Should I add this feature in JIRA?

Thanks,
Eugene

5 comments
Comment actions Permalink

Hi,

Completion and highlighting mostly use the same engine, so for JSPX
content without xmlns IDEA does not report errors because content type
is not known. This also mean that completion is not possible.

I would rather have xhtml schema to be updated to cover your case.

Evgeniy Strokin wrote:

Hi,
in JSPX if I skip xmlns="http://www.w3.org/1999/xhtml" I loose code completion for HTML tags.
Logically this is right but this is common case when people use XHTML tags in JSPX but this is not valid XHTML. For example I use custom tags a lot and some of them generate some HTML tags, so output is valid XHTML. If I set xmlns in my JSPX many XHTML tags will be highlighted as an error.
So I have dilemma or have errors highlighted in my JSPX or loose completion. I was thinking if somehow you could leave code completion for tags like HTML even if I skip xmlns attribute. You have something like that for CSS in style attribute. No matter where I have the attribute style (even in my custom tags) I have code completion, which is very handy.
What do you think? Should I add this feature in JIRA?

Thanks,
Eugene



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

I would rather have xhtml schema to be updated to cover your case.


Sure, this is a good solution. I'm gona try,
Thanks

0
Comment actions Permalink

Hmm.. I don't remember I was asked to resolved xmlns="http://www.w3.org/1999/xhtml".
Where could I find the schema of XHTML to change it for IDEA.

Thanks

0
Comment actions Permalink

Add it as external resource with this namespace (original one is in IDEA
jars and you can navigate to it when you have html (jspx) document with
namespace).

Evgeniy Strokin wrote:

Hmm.. I don't remember I was asked to resolved xmlns="http://www.w3.org/1999/xhtml".
Where could I find the schema of XHTML to change it for IDEA.

Thanks



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Hi,

We have just discovered that the w3c unofficial xhtml schema we are
using contains certain problems (we found that no 'name' in form tag
allowed in schema but it should be allowed). So be informed that errors
in your jspx could be caused by this reason too and if you encounter
such error, please, post it to the tracker. Thank you in advance.

Evgeniy Strokin wrote:

Hi,
in JSPX if I skip xmlns="http://www.w3.org/1999/xhtml" I loose code completion for HTML tags.
Logically this is right but this is common case when people use XHTML tags in JSPX but this is not valid XHTML. For example I use custom tags a lot and some of them generate some HTML tags, so output is valid XHTML. If I set xmlns in my JSPX many XHTML tags will be highlighted as an error.
So I have dilemma or have errors highlighted in my JSPX or loose completion. I was thinking if somehow you could leave code completion for tags like HTML even if I skip xmlns attribute. You have something like that for CSS in style attribute. No matter where I have the attribute style (even in my custom tags) I have code completion, which is very handy.
What do you think? Should I add this feature in JIRA?

Thanks,
Eugene



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Please sign in to leave a comment.