File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -33,11 +33,15 @@ def __iter__(self):
3333 raise LintError ("Non-void element reported as EmptyTag token: %(tag)s" % {"tag" : token ["name" ]})
3434 if type == "StartTag" :
3535 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" )
4145 if not isinstance (value , text_type ):
4246 raise LintError ("Attribute value is not a string: %(value)r" % {"value" : value })
4347 if name in cdataElements :
You can’t perform that action at this time.
0 commit comments