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

RE: Repeating elements with fixed attribute values

From: Michael Kay <mike@saxonica.com>
Date: Sat, 5 Jan 2008 16:09:51 -0000
To: "'King, Jeffrey \(Mission Systems\)'" <Jeff.King@ngc.com>, <xmlschema-dev@w3.org>
Message-ID: <00e001c84fb5$674725d0$6401a8c0@turtle>
RE: Repeating elements with fixed attribute values

> However, I am 
> wondering that if XML Schema 1.0 does not support it, then 
> maybe it's trying to tell me it's not good approach.  Are 
> there any reasons (other than XML Schema 1.0 does not support 
> it) why using the design I presented below is poor?

One can't say that something is poor design without knowing the design
objectives.

One of the main reasons for using what I call "meta-level markup" is that it
allows you to have highly variable data within the constraints of a fixed
schema. For example, you can have a wide variety of documents of the form

<table name="xyz">
<headings>
  <column>a</column>
  <column>b</column>
</headings>
<row>
  <cell>1</cell>
  <cell>2</cell>
</row>
<row>
  <cell>10</cell>
  <cell>20</cell>
</row>

and they all have the same schema; whereas if you use conventional markup

<xyzs>
  <xyz><a>1</a><b>2</b></xyz>
  <xyz><a>10</a><b>20</b></xyz>

then each document needs its own schema.

You seem to be trying to use meta-level markup together with a
document-specific schema, and that's not a combination that works especially
well.

Michael Kay
http://www.saxonica.com/  
  
Received on Saturday, 5 January 2008 16:10:06 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
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-2007 All Rights Reserved.