how to ignore some error ?

Asked by silent

is there a way to ignore some error like "Missing attribute 'alt'" ?
though <img> require it, but I do not want to always use "alt" in "img",

in other words, do not want to img tag without "alt" to be red (error), C-c C-n won't catch the error.

also:

when the xhtml code have some other tags ( like template toolkit tag <% %>, not [%%], and some other custom tags with <> ),
do not know how to use tt-mode.el with nxhtml-mumamu-mode,
how can I let nxhtml ignore these kinds of tags ?
because the file is mainly xhtml, ignore these tags can make less error.

thank you

Question information

Language:
English Edit question
Status:
Answered
For:
nXhtml Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
lborgman (lennart-borgman) said :
#1

There is no simple way to do it if you are using nxhtml-mode (or nxml-mode) since the purpose is to help you write correct XHTML. If you want to change this you have to change the *.rng files.

Since < is not allowed in XHTML except for tags it is not possible. Changing that in the code would be very difficult.

To get around this nXhtml gives you the possibility to use multi major modes. There is a multi major mode tt-html-mumamo-mode you can use. (However I just saw that I forgot to autoload that so you have to load mumamo-fun.el before you can use it.)

Can you help with this problem?

Provide an answer of your own, or ask silent for more information if necessary.

To post a message you must log in.