Discussion Forums

RELAX NG Schema for FAST 1.2?
Stephen Pope / Prediction Company LLC/UBS AG
4 May 2012 2:39PM ET

Is there a (draft of a) RELAX NG specification for the FAST 1.2 proposal?

The proposal itself is certainly not normative and leaves much to the imagination, particularly with regards to the new <define>, <type>, and <field> elements. Clearly, some of the attributes which in FAST 1.1 used to be associated with the field elements (i.e. <int32/>, <string/>, etc.) have moved either to the new <field> element, the new <type> element, or have moved to the new non-field type elements( <int32/>, <string/>, etc.)

All the provided examples indicate that a <define> element is legal content for a <templates> element, but could it also be used within a <template> element>?

Also, it is not clear how to evaluate dictionary="type" and dictionary="template" when used on an operator element contained by a type contained in a <define> element. As there is (or may be) no <template> element in the parentage of the <define> element, we apparently need to search instead not within the element tree (e.g. DOM), but rather via the referring <type> elements. However, what about searching for for the ns attribute that goes with a key attribute: should we search the parentage in the element tree, or via the <type> references, or some combination of them since each could yield a possibly differing value.

By way of example:

<templates templateNs="tns1" ns="ns1">
  <define name="SeqNo">
    <uInt32><copy dictionary="type" key="seqno"/></uInt32>
  </define>

  <define name="CopyString">
    <string><copy dictionary="template" key="copystring"/></string>
  </define>

  <template name="A" templateNs="tns2" ns="ns2">
    <typeRef name="AType"/>
    <field name="seq"><type name="SeqNo" ns="ns1"></field>
    <field name="string"><type name="CopyString" ns="ns1"></field>
  </template>

  <template name="B" templateNs="tns3" ns="ns3">
    <typeRef name="BType"/>
    <field name="seq"><type name="SeqNo" ns="ns1"></field>
    <field name="string"><type name="CopyString" ns="ns1"></field>
  </template>
</templates>

Now, it seems pretty clear that the resulting actual dictionary "names" should be (assuming an obvious format for constructing them to follow the name matching rules):

template A field seq: type.ns2.AType
template A field string: template.ns2.ATemplate
template B field seq: type.ns3.BType
template B field string: template.ns3.BTemplate

however it is much less clear what the keys should become because I have not specified an ns attribute on the operators. If I follow the <type> reference as for the dictionaries, then do I pick up the ns="ns1" that appears in the <type> element (and must, to correctly reference the <define>), or the ns attribute from the <template> elements? On the other hand, if I strictly follow the element tree parentage, I would of course pick up the ns attribute from the <templates> instance.

Having a RELAX NG schema and a description of how to handle dictionary and key ns attributes with the new type definition elements would be most helpful!

My interest in FAST 1.2 lies purely in exploiting it for internal purposes; all the external instances of FAST I work with are of course still FAST 1.1 or deviations therefrom. So I am in fact free to make my own interpretations, but ...

stephen


RELAX NG Schema for FAST 1.2?
Stephen Pope / Prediction Company LLC/UBS AG   4 May 2012 2:39PM ET
Re: RELAX NG Schema for FAST 1.2?
Stephen Pope / Prediction Company LLC/UBS AG   4 May 2012 5:27PM ET