Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Reusing XSD information for full and update record

Thread Tools

Reusing XSD information for full and update record

Posts: n/a
Hi everyone!

I want to exchange full and partial records with XML. Example:


Another type of element to change that record's person's first name:


So in the full record, all elements must be present, while the update
version only has to contain the id, and everything else is optional
(well, there should be at least one element).

In the schema definition, I don't have to have different element types
for a full record and an update record, but I'm doing that right now,
with the same sequence of child elements (id, lastname, firstname), only
that in the update version, there is minOccurs=0 maxOccurs=1 for
everything but the id while in the full version both attributes are 1 to
make all elements mandatory.

Is there a better way to express this? Whenever fields are added,
removed or modified I have to edit .xsd files in two places, the type of
the full and the update record. This is error-prone.

Thanks in advance!
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
member template -- reusing type information? C++ 0 08-09-2008 01:09 PM
Adding new record using previous record information... help!! Maximus ASP General 2 04-12-2007 09:55 PM
XML + XSD: Is it possible to get all errors against the XSD? Markus Java 1 11-22-2005 02:53 PM
Difference between <import ....xsd> and <xlink:href=.....xsd> ???? Bernd Oninger XML 1 06-30-2004 08:21 AM
using dropdown box to display db record & update record Jimmy Tran ASP General 1 10-03-2003 04:20 PM