[DFDL-WG] questions on setVariable

Cranford, Jonathan W. jcranford at mitre.org
Tue Sep 10 12:53:14 EDT 2013


These questions may go towards public comment if the answers aren't straight-forward.  Section references are against latest editor's draft.



*        Section 7.9 - 5th paragraph after first example - "A dfdl:setVariable value expression may refer to the value of this element using a relative path value '.'. "



Which element?



If dfdl:setVariable is attached to a simpleType, then the "element" referred to here is the element of that type, correct?



But when it's attached to group reference, sequence, or choice, is it the parent element which contains the group reference, sequence, or choice?





*        Section 7.9 - next-to-last paragraph:  "However, the order of execution among them is not specified."



Wouldn't this be ambiguous, then?



<xs:schema>

    <xs:annotation>

    <xs:appinfo source="http://www.ogf.org/dfdl/">

      <xs:defineVariable name="bar" />

      <xs:defineVariable name="baz" defaultValue="biff"/>

    </xs:appinfo>

    </xs:annotation>

...

    <xs:element name="foo">

      <xs:annotation>

        <xs:appinfo source="http://www.ogf.org/dfdl/">

          <xs:setVariable ref="bar" value="{$tns:baz}"/>

          <xs:setVariable ref="baz" value="fooey"/>

        </xs:appinfo>

      </xs:annotation>

    </xs:element>

...

</xs:schema>



If the order of execution isn't specified, isn't it ambiguous whether tns:bar gets the value of "biff" (defaultValue of tns:baz) or "fooey"?





Respectfully,


--
Jonathan W. Cranford
Senior Information Systems Engineer
The MITRE Corporation (http://www.mitre.org)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20130910/17200024/attachment.html>


More information about the dfdl-wg mailing list