Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xml-dev] Mixed content in data-binding (Was: Re: [xml-dev] Interesting pair of comments

From: "Michael Kay" <mike@--------.--->
To: "'Peter Gerstbach'" <peter.gerstbach@---.--->,"'XML-dev'" <xml-dev@-----.---.--->
Date: 7/15/2005 8:30:00 AM
> 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

<email>fred@s...<last-modified>2005-02-02</last-modified></email>

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
http://www.saxonica.com/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent