File tree 1 file changed +9
-5
lines changed
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -33,11 +33,15 @@ def __iter__(self):
33
33
raise LintError ("Non-void element reported as EmptyTag token: %(tag)s" % {"tag" : token ["name" ]})
34
34
if type == "StartTag" :
35
35
open_elements .append (name )
36
- for name , value in token ["data" ]:
37
- if not isinstance (name , text_type ):
38
- raise LintError ("Attribute name is not a string: %(name)r" % {"name" : name })
39
- if not name :
40
- raise LintError ("Empty attribute name" )
36
+ for (namespace , localname ), value in token ["data" ].items ():
37
+ if namespace is not None and not isinstance (namespace , text_type ):
38
+ raise LintError ("Attribute namespace is not a string or None: %(name)r" % {"name" : namespace })
39
+ if namespace == "" :
40
+ raise LintError ("Empty attribute namespace" )
41
+ if not isinstance (localname , text_type ):
42
+ raise LintError ("Attribute localname is not a string: %(name)r" % {"name" : localname })
43
+ if not localname :
44
+ raise LintError ("Empty attribute localname" )
41
45
if not isinstance (value , text_type ):
42
46
raise LintError ("Attribute value is not a string: %(value)r" % {"value" : value })
43
47
if name in cdataElements :
You can’t perform that action at this time.
0 commit comments