W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2004

RE: Pattern constraint on string content of complexType having attribute and choice

From: Michael Kay <mhk@mhk.me.uk>
Date: Wed, 11 Aug 2004 16:24:06 +0100
To: "'Jeni Tennison'" <jeni@jenitennison.com>, "'Wyatt Barton'" <hiddenharvest@yahoo.com>
Cc: <xmlschema-dev@w3.org>
Message-ID: <E1BuwuP-0007dJ-1d@frink.w3.org>

> Just because I'm interested, can you give more details about the
> markup-language design that you're trying to support here?

If you do a direct translation of GEDCOM into XML you get a similar
requirement. GEDCOM uses elements that contain a value followed by
qualifiers, for example

<occupation>baker
  <date>10 MAR 1566
   <note>unsure which calendar
     <author>MHK</author>
     <date>10 AUG 2004</date>
   </note>
  </date>
</occupation>

The obvious answer of puttting the value in another layer of markup:

<occupation><value>baker</value>
  <date><value>10 MAR 1566</value>
   <note><value>unsure which calendar</value>
     <author><value>MHK</value></author>
     <date><value>10 AUG 2004</value></date>
   </note>
  </date>
</occupation>

is pretty ugly, and is excessively verbose when 95% of values have no
qualifier.


Michael Kay
Received on Wednesday, 11 August 2004 17:29:05 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:15:10 UTC