<div dir="ltr"><div>On the technical side, if you use Subset, you need to provide valid vo-dml ids to the stereotype in the UML.</div><div>Subset:</div><div> Name = vo-dml id of the element being constrained (e.g. meas:GenericPosition.coord )</div><div> Body = vo-dml id of the type constraint (e.g. coords:CoordValue[1])</div><div>I don't recall if both are verified or not, but this is the expectation on the UML for the xslt scripts.</div><div><br></div><div>Constraint: is easier</div><div> It applies to the object it is associated with, so no need to specify the vo-dml id in Name</div><div> Body = free text</div><div><br></div><div>Mark</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 14, 2019 at 6:32 AM Gerard Lemson <<a href="mailto:glemson1@jhu.edu">glemson1@jhu.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hi Laurent<br>
SubsettedRole is a special form of Constraint, one that merely indicates that on a subtype, the datatype of an inherited Role is a more specific version (subtype) of the datatype of that Role as defined on the supertype.<br>
You can actually define free form Constraint-s, see section 4.20 of the VO-DML spec.<br>
These are defined using "free" text in the description element of the Constraint, and is defined at the level of the type, not a Role.<br>
The modeler is free to make up their own computer readable constraint language if they wish.<br>
E.g. as in the VO-DML/XML sample in that section :<br>
<constraint> <br>
<description>-90&lt;=self.latitude.value&lt;=90 </description> <br>
</constraint><br>
<br>
Does this help?<br>
Cheers<br>
Gerard<br>
<br>
> -----Original Message-----<br>
> From: <a href="mailto:dm-bounces@ivoa.net" target="_blank">dm-bounces@ivoa.net</a> <<a href="mailto:dm-bounces@ivoa.net" target="_blank">dm-bounces@ivoa.net</a>> On Behalf Of Laurent<br>
> Michel<br>
> Sent: Friday, June 14, 2019 5:25<br>
> To: <a href="mailto:dm@ivoa.net" target="_blank">dm@ivoa.net</a><br>
> Subject: VO-DML subsetting<br>
> <br>
> <br>
> Hello,<br>
> <br>
> In my model, I would like to put a constraint (SubsettedRole) on an attribute<br>
> value in the context of a specific class:<br>
> <br>
> Example:<br>
> - SuperClass A(attribute: a:string)<br>
> - SubClass B extends A (constraint: a='ImB')<br>
> <br>
> This is legal in UML since constraints are free text but the VO-DML validator<br>
> (schematron) disallow this.<br>
> The Schematron validates constraints by applying a regular expression on the<br>
> SubsettedRole which reject any sort of expression:<br>
> <br>
> [a-zA-Z][a-zA-Z0-9\._\-]+:[a-zA-Z][a-zA-Z0-9\._]*<br>
> <br>
> This is fine to put a constraint on class name (Class B extends A (constraint: a is<br>
> instance of X)) , but nothing in the spec disallows to write an expression like<br>
> (Class B extends A (a is not null))<br>
> <br>
> How can I do this?<br>
> <br>
> Laurent<br>
> --<br>
> jesuischarlie/Tunis/Paris/Bruxelles/Berlin<br>
> <br>
> Laurent Michel<br>
> SSC XMM-Newton<br>
> Tél : +33 (0)3 68 85 24 37<br>
> Fax : +33 (0)3 )3 68 85 24 32<br>
> Université de Strasbourg <<a href="http://www.unistra.fr" rel="noreferrer" target="_blank">http://www.unistra.fr</a>> Observatoire Astronomique<br>
> 11 Rue de l'Université<br>
> F - 67200 Strasbourg<br>
> <br>
<br>
</blockquote></div>