Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XML Schema Question

Reply
Thread Tools

XML Schema Question

 
 
Matthew Harrison
Guest
Posts: n/a
 
      08-06-2007
I am defining an abstract conversation class in XML Schema (using XMLSpy).

The basics are:

Conversation (attr:Reference)
--> Identity (1)
--> Id
--> Client
--> Sequence (atrr:Index) (1..n)
--> Sender
--> Timestamp

Now I want to define a descendant called

BlahConversation based on Conversation

However, I need to include additional fields in Sequence (status
information specific to the Blah type).

How do I correctly structure things, such that I don't end up having to
define the whole structure fully for each different conversation subtype ?

Thanks.

--
Pinging self [127.0.0.1] with 32 bites of banana cake:

Ping statistics for 127.0.0.1:
Slices: Sent = 4, Received = 0, Lost = 4 (100% loss),
 
Reply With Quote
 
 
 
 
Boris Kolpackov
Guest
Posts: n/a
 
      08-07-2007
Hi Matthew,

Matthew Harrison <(E-Mail Removed)> writes:

> Conversation (attr:Reference)
> --> Identity (1)
> --> Id
> --> Client
> --> Sequence (atrr:Index) (1..n)
> --> Sender
> --> Timestamp


This can be interpreted in many different ways. Shows us the XML
documents that correspond to BlahConversation and Conversation.

-boris

--
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding
 
Reply With Quote
 
 
 
 
Matthew Harrison
Guest
Posts: n/a
 
      08-07-2007
Boris Kolpackov wrote:
> Hi Matthew,
>
> Matthew Harrison <(E-Mail Removed)> writes:
>
>> Conversation (attr:Reference)
>> --> Identity (1)
>> --> Id
>> --> Client
>> --> Sequence (atrr:Index) (1..n)
>> --> Sender
>> --> Timestamp

>
> This can be interpreted in many different ways. Shows us the XML
> documents that correspond to BlahConversation and Conversation.
>
> -boris
>


Conversation would never have a document defined against it (it's an
abstract 'class'):

However, here is two sample XML documents which are descendants, I want
them both to adhere to the Conversation schema in addition having
further definitions in either the Identity or Sequence sections, or
both. For example the MsgConversation has a MsgText, the
BlahConversation has a BlahInfo.

<?xml version="1.0" encoding="UTF-8"?>
<MsgConversation Reference="AAAA1234567890">
<Idenity>
<Id>0</Id>
<Remote>AA40019</Remote>
<Client>47</Client>
<Module>Msg</Module>
</Idenity>
<Sequence Index="1">
<Sender>remote</Sender>
<TimeStamp>2001-12-17T09:30:47.0Z</TimeStamp>
<MsgText>Blah Blah Blah</MsgText>
</Sequence>
<Sequence Index="2">
<Sender>client</Sender>
<TimeStamp>2001-12-17T09:30:47.0Z</TimeStamp>
<MsgText>Blah Blah Blah</MsgText>
</Sequence>
</MsgConversation>



<?xml version="1.0" encoding="UTF-8"?>
<BlahConversation Reference="AAAA1234567892">
<Idenity>
<Id>0</Id>
<Remote>AA40029</Remote>
<Client>44</Client>
<Module>Blah</Module>
</Idenity>
<Sequence Index="1">
<Sender>remote</Sender>
<TimeStamp>2001-12-17T09:30:47.0Z</TimeStamp>
<BlahInfo>01100010</BlahInfo>
</Sequence>
<Sequence Index="2">
<Sender>client</Sender>
<TimeStamp>2001-12-17T09:30:47.0Z</TimeStamp>
<BlahInfo>01101011</BlahInfo>
</Sequence>
</BlahConversation>




--
Pinging self [127.0.0.1] with 32 bites of banana cake:

Ping statistics for 127.0.0.1:
Slices: Sent = 4, Received = 0, Lost = 4 (100% loss),
 
Reply With Quote
 
 
 
Reply

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
web.xml / XML schema issue, why do some XML schema attributes disappear asciz@starmail.com Java 3 02-20-2007 09:56 AM
Validation with XSD using XML::LibXML::Schema, and XML::Validator::Schema huntingseasonson@gmail.com Perl Misc 5 11-29-2006 12:37 PM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
XML Schema to XML Schema Conversion Hari Om XML 1 03-02-2004 09:04 PM
XML schema regular expressions question and recommended XML Schema book Fred Smith XML 1 02-05-2004 11:12 AM



Advertisments