 |
 |
 |
Well, if you're just counting bits:
<task><taskType1></taskType1>...</task>
doesn't seem vastly different to:
<task taskType="Type1">...</task>
Verbosity is pretty much the nature of the XML beast, and basing your
modelling on reducing that in general seems the wrong way to do things.
On further reflection though, I think one of the original solutions based
the answer on deriving from task with type xs:anyType. I didn't like that
because it seemed to take semantic meaning away from the tag and place it
with the attribute value. But I think what the original poster to this
thread wants is to define a type that encompasses all tasks and have that as
the type of 'task' and then use xs:restriction to constrain to a particular
type of task (with xsi:type). That approach constrains what can be included
in the type referenced by xsi:type and I'm more comfortable with that.
Pete.
=============================================
Pete Cordell
http://www.xml2cpp.com
=============================================
----- Original Message -----
From: "Bryan Rasmussen" <brs@i...>
To: "'Pete Cordell'" <petexmldev@t...>
Cc: <xmlschema-dev@w...>
Sent: Tuesday, November 15, 2005 8:52 AM
Subject: SV: Schema help
>
>
>
>
>
>>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.
> I found this amusing in a twisted way, it struck me that working to XSD's
> strengths was synonymous with producing particularly ugly XML.
>
>><task>
>> <!-- common task elements here -->
>> <taskType1>
>> <!-- Task 1 things -->
>> </taskType1>
>></task>
>
>>or:
>
>><task>
>> <!-- common task elements here -->
>> <taskType2>
>> <!-- Task 1 things -->
>> </taskType2>
>></task>
>
> I'm sorry but are you suggesting that task has a choice of taskType1
> taskType2 and so forth? Sometimes I think the worse thing that was ever
> put
> in the xml spec was that thing about verbosity not being a problem.
>
>
> Of course I've been ranting this for years (the anti xml schema stuff),
> they
> called me mad at the academy, etc. etc.
>
> Cheers,
> Bryan Rasmussen
>
>
From noah_mendelsohn@u... Tue Nov 15 18:06:17 2005
Received: from maggie.w3.org ([193.51.208.68])
by frink.w3.or
|
 | 



|  |
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.
|  |
| |
 |
 |
 |