Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Can XSD do "by reference"

From: Michael Kay <mike@--------.--->
To: 'Rich Adili' <Rich.Adili@----.--->, xmlschema-dev@--.---
Date: 8/8/2007 12:59:00 PM
Your requirements would be a lot clearer if you gave a sample of the
instance XML.

It sounds to me as if you are trying to do something like

<row>
  <column name="x" value="3"/>
  <column name="y" value="fred"/>
</row> 
<row>
  <column name="x" value="5"/>
  <column name="y" value="bill"/>
</row>

That really does't lend itself at all well to writing an XSD schema, which
assumes that you can work out the intended type of an element or attribute
from knowledge of its name and its containing type.

Michael Kay
http://www.saxonica.com/
 

> -----Original Message-----
> From: xmlschema-dev-request@w... 
> [mailto:xmlschema-dev-request@w...] On Behalf Of Rich Adili
> Sent: 08 August 2007 05:40
> To: xmlschema-dev@w...
> Subject: Can XSD do "by reference"
> 
> 
> I would like to define a sort of row-column schema. Although 
> the XML is easy to write manually, I'm having trouble finding 
> an elegant schema design. The requirements are:
> 
> 1. A sequence (1 or more occurrences) of column definitions, 
> which is straightforward enough i.e. a sequence of elements 
> each with a sequence of identical children. This would permit 
> one to create column types by adding an entry to this list of 
> properties that a column must have. A simplistic example: 
> columns must have properties Name and Type. One instance 
> might have Name="Purchase Type" and Type="string". Another 
> instance might have Name="Purchase Date" and Type="Date".
> 
> 2. Another sequence that provides row data using references 
> to each of the above types rather than a copy 
> (Name(1)="Capital Equipment" AND Name(2)="1/1/2007");
> 
> I can be quite flexible as to the particulars as long as it 
> will pass through the Visual Studio code generator(XSD.exe) 
> and provide the above properties. However, I haven't found a 
> way to do the reference bit in #2. Visual Studio's DataSet 
> designer provides an implementation of this using data 
> relations but it's rather complex. Is a simpler solution feasible?
> 
> Rich
> 


From tuquenukem@h... Thu Aug 09 00:59:37 2007
Received: from lisa.w3.org ([128.30.52.41])
	by 


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