[UR-WG] Comments/Questsions on usage#draft3 schema
Donal K. Fellows
donal.k.fellows at manchester.ac.uk
Wed Sep 27 04:30:01 CDT 2006
Matt Ford wrote:
> I have some comments/questions on your latest release of the proposed
> 2.0 spec.
>
> - It's much more legible now; your effort in this is much appreciated by
> me at least! :-)
Heh! :-D
> - I like the much cleaner type derivations.
>
> - With regard to the AtomicActivityUsageRecord type:
> * I don't like how we call it an AtomicActivity and then use "JobName"
> as an element name. The activity may have nothing to do with jobs; I
> still feel as though we have a mix of the specific and generic in this type.
That bit was a cut-n-paste job done in a hurry. We can change it.
> * In a similar line of thinking I wonder if elements such as "Status"
> should not be global and instead be local to a derived type such as
> "AtomicActivity" i.e., declared instead of referenced. Not all Usage
> records will necessarily have "Status" and it's meaning can in principle
> vary wildly.
I think I could repeat myself here.
> - With regard to the CompoundUsageRecord:
> * It's abstract as you note; so how's it made specific? (the
> following questions may be due to my ignorance of XSD's). I guess I
> could extend the schema but how then do we make it so that people don't
> go off and arbitrarily extend it? How do we capture this if they do?
> For example if I naively defined a "grid-job" - treat this name as
> arbitrary ;-) - as the collection of AtomicActivity UsageRecords spawned
> by my Resource Broker (never more than ten) what do I do?
The purpose of the CUR is to define how to build compounds, and not why.
The grounding of the compound is therefore a required step, and might be
done like this:
<xsd:complexType name="AllGridJobsForAWeek">
<xsd:annotation>
<xsd:documentation>
This is a compound UR type that is intended to indicate all
jobs executed by a particular user on some grid in a
particular week. Note that this is a higher-level constraint;
no schema can capture the notion at a syntactic level. As
such, it's just documented here. Not all compounds are this
simple syntactically though.
</xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="usage:CompoundUsageRecord"/>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="AllGridJobsForAWeek"
type="tns:AllGridJobsForAWeek"
substitutionGroup="usage:UsageRecord"/>
It should be noted that I might move the xsd:any from the CUR type into
the element; the processing of xsd:any in the presence of XML schema
extension is very strange indeed. (Every time I look at at it, I end up
going "what was the author on when they thought of that?" and that's not
a good sign.)
> Should I even attempt this: my aim is to extend the schema to allow only
> compound records of 0 to 10 Atomic Activity records only?
[...]
Maybe. I'm not a big enough schema whizz to say (I've never tried doing
restriction of complex types). But it certainly looks close.
> Or should I be thinking of CompoundUsageRecord as plumbing for as yet
> undefined parts of the UR-WG schema?
That's my real plan, with the definitions not necessarily being part of
the UR-WG schemas. Private extensions are acceptable.
Donal.
More information about the ur-wg
mailing list