Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A trivial use case would be adding a replace function callable from a DPath expression. In the DFDL Schema, we might call  something like the below; Where the function will return "Hello_World" if the element resolves to "Hello World". 

Code Block
xmlns:sdf="com.ext.UDFunction.StringFunctions"
...
dfdl:choiceDispatchKey="{ sdf:replace(xs:string(../MessageTextFormatIdentifier), ' ', '_') }"

...

Another use case would be implementing the normalization of elevation above Mean-Sea-Level (MSL) to Height-Above-Ellipsoid (HAE) for Link16F1 data. In the DFDL schema, we might call something like the below; where the functions will return the result of the conversion.

Code Block
xmlns:mhdf="http://extOther.UDFunction.ElevationConversions.com"
...
dfdl:outputValueCalc="{ mhdf:convert_to_hae(../elevation, ../hae_adjustment, ../scaling_factor) }"

...