Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Schema help

From: "Pete Cordell" <petexmldev@--------------.--->
To: "George Cristian Bina" <george@---------.--->, "Chandrasekhar A" <chandrashekarrvt@-----.--->
Date: 11/15/2005 8:29:00 AM
Hi,

Yes, this has come up a number of times recently, but I personally didn't 
find the solutions particularly appealing!

Maybe people that want to do this sort of thing should consider re-modelling 
their data so that it works to XSD's strengths.  For example, they could 
model it so that the resulting XML looked something like:

<task>
    <!-- common task elements here -->
    <taskType1>
        <!-- Task 1 things -->
    </taskType1>
</task>

or:

<task>
    <!-- common task elements here -->
    <taskType2>
        <!-- Task 1 things -->
    </taskType2>
</task>

With suitable attributeGroups, regular groups, and types XSD can model this 
sort of thing well.

HTH,

Pete.
--
=============================================
Pete Cordell
for XML to C++ data binding visit
http://www.tech-know-ware.com/lmx
(or http://www.xml2cpp.com)
=============================================

----- Original Message ----- 
From: "George Cristian Bina" <george@o...>
To: "Chandrasekhar A" <chandrashekarrvt@g...>
Cc: <xmlschema-dev@w...>
Sent: Tuesday, November 15, 2005 7:12 AM
Subject: Re: Schema help


>
> Hi Chandu,
>
> Check the list archives for this month, this question has been asked at 
> least two times:
> http://lists.w3.org/Archives/Public/xmlschema-dev/2005Nov/thread.html
>
> Best Regards,
> George
> ---------------------------------------------------------------------
> George Cristian Bina
> <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
> www.---.com
>
>
> Chandrasekhar A wrote:
>> Hello All,
>>
>>        I am developing XML schema for my application. I struck up
>> while writing XSD. Please can any body help.
>>
>> My requriment is :
>>    We have to support diffirent type of task. Each task is in XML
>> format. I have a tag called type and parameter type as a elements in
>> XSD. If task type is type1, only subset of parameters type I have
>> support. If task type is type2, only subset of parameters type I have
>> support. Parameters type is global tag - contains all the parameter
>> types for all tasks. My question is
>> if ( task type = 'type1' )
>> {
>>  parameter type 1
>>  parameter type 2
>> }
>> else if ( task type = 'type2' )
>> {
>>  parameter type 2
>>  parameter type 3
>> }
>> else if ( task type = 'type3' )
>> {
>>   parameter type1
>>   parameter type2
>>   parameter type3
>>   parameter type4.
>> }
>>
>>   How to specify this code in XSD ?
>>
>>
>> Thanks and Regards,
>> Chandu
>>
>>
>
> 



From brs@i... Tue Nov 15 08:55:14 2005
Received: from lisa.w3.org ([128.30.52.41])
	by frink.w3.org with esmtp (Exim 4.50)
	id 1Ebwav-00004y-V


transparent
Print
Mail
Digg
delicious
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