CybOXProject / schemas

CybOX Schemas and Schema Development
42 stars 17 forks source link

URIObject field 'type' #341

Open c-x opened 9 years ago

c-x commented 9 years ago

In the current version of CybOX, is the field 'type' required or not? It sounds to be according to the docs, but they are so many examples out there that don't implement it... Its hard to know what is required or not.

https://cybox.mitre.org/language/version2.1/xsddocs/objects/URI_Object.html http://cybox.mitre.org/about/example_patterns.html

Are those two declarations valid regarding the current specifications or is just the second one ?

<cybox:Properties xsi:type="URIObj:URIObjectType">
<cybox:Properties xsi:type="URIObj:URIObjectType" type="URL">

Thanks,

ikiril01 commented 9 years ago

This field is not strictly required per the XML schema, although we generally suggest including it as a best practice. Therefore, the two declarations that you have in your example would be valid.

c-x commented 9 years ago

If it's best practice, maybe a good idea for the evolution of this standard would to have it as mandatory so all users will have no choice than following the best practices (-:

Moreover, if I recall correctly, they are no default values. In short, not having it set the property to 'undefined' (and not to URL for example).