[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Penance for misspent attributes


arjun penance story
/ "Simon St.Laurent" <simonstl@s...> 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@S...   | On the other hand, you have different fingers.
XML Standards Engineer |
XML Technology Center  | 
Sun Microsystems, Inc. | 

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.