[ expat-Bugs-787387 ] xmlwf -n on file which uses a ':' as attribute name
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.text.xml.expat.bugs |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #787387, was opened at 2003-08-12 12:57 Message generated for change (Comment added) made by pointsman You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=787387&group_id=10127 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: xmlwf -n on file which uses a ':' as attribute name Initial Comment: xmwf -n on file <!DOCTYPE doc [ <!ELEMENT doc (#PCDATA)> <!ATTLIST doc : CDATA #IMPLIED> ]> <doc :="v1"></doc> reports valid/sa/012.xml:3:14: syntax error as it does not like ':' as an attribute name. I'm not quite sure whether this is a bug or not - cf. http://www.w3.org/TR/REC-xml-names/ [4] NCName ::= (Letter | '_') (NCNameChar)* [5] NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender [6] QName ::= (Prefix ':')? LocalPart [7] Prefix ::= NCName [8] LocalPart ::= NCName and http://www.w3.org/TR/REC-xml#attdecls [52] AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>' [53] AttDef ::= S Name S AttType S DefaultDecl [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender [5] Name ::= (Letter | '_' | ':') (NameChar)* [email protected] ---------------------------------------------------------------------- Comment By: Rolf Ade (pointsman) Date: 2003-08-13 01:00 Message: Logged In: YES user_id=13222 Not a bug. expat is right. You've quoted even the right productions, to decide this. (4) says, that a NCName must have at least one char and a colon isn't allowed. (By the way: I always thought, that NCName stands for non colon name, but could not found a source for that, at the moment). Prefix (7) and Localpart (8) are both NCNames. A colon in the QName is therefor only possible, if the QName has a prefix. Since the prefix must have at least one char, the att name in your example hasn't a prefix. Note, that your document is a wellformed XML document - and xmlwf (without -n) confirms this. It's only not a wellformed namespaced XML document. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=787387&group_id=10127