Extending ReferenceItem

There has been some internal discussion and consensus (I think) that the query elements need to be generalized to support resource or component queries, or both. To do this, here are a couple formatting options to consider.

1. Use current syntax in ComponentItem
e.g.

<Query Name="smtk::attribute::Resource" Filter="attribute[type='material']" />
// TBD syntax for combined resource & component query

2. Use more descriptive attribute names
e.g.

<Query Resource="smtk::attribute::Resource" Component="attribute[type='material']" />
<Query Filter="smtk::attribute::Resource//attribute[type='material']" />
  • Each query string has a different name (Resource, Component, Filter).
  • In the first example, either Resource or Component can also be omitted if not relevant:
<Query Resource="smtk::attribute::Resource" />
<Query Component=attribute[type='material']" />

2a.\ Minor variation

If the general term “Filter” is too non-descriptive, we could also change the element name from Query to Condition to free up “Query”, that is

<Condition Query="smtk::attribute::Resource//attribute[type='material']" />
<Condition Resource="smtk::attribute::Resource" Component="attribute[type='material']" />
<Condition Resource="smtk::attribute::Resource" />
<Condition Component=attribute[type='material']" />

If we were starting from scratch, this would be my preference, but it might cause some heartburn in terms of supporting this in addition to the current smtk query syntax.