OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Penance for misspent attributes

[ Lists Home | Date Index | Thread Index ]

/ "Simon St.Laurent" <simonstl@simonstl.com> was heard to say:
| On Thu, 2002-05-16 at 14:34, Arjun Ray wrote:
[...]
|> Taking the minority view, I would say that it isn't.  That is, rather than
|> trying to unify attributes and (sub)elements - especially those that wind
|> up with the moral equivalent of (#PCDATA) content models - it may be more
|> fruitful to keep them distinct. 
|
| That's the conclusion I'm reaching, and strongly.  Suddenly I can
| abolish a whole group of annoying problems - if I just stick to elements
| for content. 

Yes, this simple rule crystalized for me at XML 2001 in conversations
I had with a number of people about "the character entity problem"
(and internationalization more generally). Put no human-readable text
in attributes, only tokens. 

This makes an element-based solution to the named characters problem
technically feasible (whether or not it's practical is another matter)
and avoids a number of issues that haven't yet cropped up to bite me
(personally), such as the need for additional markup in order to
support bidi and certain forms of annotation (like rubi, I believe).

That said, I am sometimes lured by the "opposite" solution. If we
allowed attributes to have content, then we could view an element as
having any number of equivalent children, just one of whom happened to
be anonymous. There's a certain elegance there[*], but common sense
always pulls me back to reality :-)

                                        Be seeing you,
                                          norm

[*] This idea is to elegant to have been mine, James presented it to
me a few years back.

-- 
Norman.Walsh@Sun.COM   | On the other hand, you have different fingers.
XML Standards Engineer |
XML Technology Center  | 
Sun Microsystems, Inc. | 




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS