[Expat-bugs] [ expat-Bugs-787387 ] xmlwf -n on file which uses a ':' as attribute name

SourceForge.net noreply at sourceforge.net
Thu Jun 8 16:31:00 CEST 2006


Bugs item #787387, was opened at 2003-08-12 05:57
Message generated for change (Comment added) made by nobody
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=787387&group_id=10127

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: Not a Bug
Status: Closed
Resolution: Invalid
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)* 

tcrhak at suse.cz

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2006-06-08 07:30

Message:
Logged In: NO 

Just for letting you guys know, NCN stands for "non-
colonized" Names, you can check 
http://www.w3.org/TR/2004/REC-xmlschema-2-
20041028/datatypes.html#NCName for NCName full description.

lucas.massuh at gmail.com

----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2003-08-12 20:29

Message:
Logged In: YES 
user_id=3066

Closing as not-a-bug, for the reason explained by Rolf.

----------------------------------------------------------------------

Comment By: Rolf Ade (pointsman)
Date: 2003-08-12 18: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


More information about the Expat-bugs mailing list