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] Mixed content in data-binding (Was: Re: [xml-dev] Interest

[ Lists Home | Date Index | Thread Index ]

> Possibly, for names of people. All over the world, there are many 
> different kinds of names: first name, last name, middle name, the 
> Russian have father's name, full Arabic names can be very, very long.
> Therefore mixed content might be a good solution to show 
> which part of 
> the full name is the first name or the family name.

There are also applications of mixed content that don't fall into the
classic "marked-up text" model. For example, it can be used to record
"properties of properties", as in


As Eric said, we tend not to do this because it's not well supported by
tools, and it's not well supported by tools because people don't do it much.
But it's an area where the XML Schema spec didn't carry through its design
principle that elements should be able to do anything that attributes can
do: if last-modified were an attribute then I could constrain the email
address with a pattern facet. 

The advantage of using elements here, of course, is that one can have a more
complex structure, e.g. a complete change history for the <email> attribute.
Some would say one should wrap the actual email address in another element,
say <email><value>...</value><last-modified/></email>. But why? Only because
mixed content isn't well supported. If the "properties of properties" appear
rarely, then the extra <value> element is a significant overhead.

Michael Kay


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

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