I agree with most of what you've said. I just wanted to point out that using
hyphens is not sub-standard. Avoiding them is a good decision if that's up
to you and you happen to use a language like AS (which lets you reference
previously undefined identifiers and would cause the "-" to clash with the
substraction operator). Nevertheless, there are many cases out there of
perfectly legal and standard xml files that do use hyphens (crossdomain,xml,
for example).

Cheers
Juan Pablo Califano


2008/7/3, Steven Sacks <[EMAIL PROTECTED]>:
>
> Just because you CAN do it (as this document is just that, documentation),
> it doesn't mean you SHOULD.
>
> I mean, you CAN put underscores in class names.  You CAN start class names
> with lower case characters.  You can make all your variable names ALL CAPS
> even if they're not constants.  You can put 10 underscores and dollar signs
> alternating _$_$_$_$_$ before every variable name if you want to.  You can
> cast every variable as an Object, or as *.  The language supports it, and
> the documentation says you're able to do it.
>
> So just because XML supports it, and the documentation says it's allowed,
> doesn't mean it's in any way a good practice, or smart, or even acceptable.
>  In fact, it is not.  I'll give you the number one reason why.
>
> Because XML is MEANT to be read by programming languages while still being
> human readable.
>
> Programming languages generally don't like hyphens in the middle of
> attribute names or variable names.  You have to do hacky stuff like bracket
> access to use them.
>
> Hence, you should never use hyphens in XML attributes or node names.
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to