blob: 3be3325122fd1a32af03a7537dfefcb0550115e3 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE schema>
<schema xmlns="http://www.ogf.org/dfdl/dfdl-1.0/XMLSchemaSubset"
targetNamespace="http://www.example.org/example1/"
xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/"
xmlns:xsd="http://www.ogf.org/dfdl/dfdl-1.0/XMLSchemaSubset"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
<!-- Float math example from old defuddle -->
<!-- Basic Math in DFDL Representations -->
<element name="ROOT">
<complexType>
<sequence>
<element name="x" type="xsd:float"
dfdl:terminator=","
dfdl:encoding="US-ASCII"/>
<element name="y" type="xsd:float"
dfdl:separator=","
dfdl:encoding="US-ASCII"
dfdl:terminator="%NL;"/>
<element name="Multiply" type="xsd:float"
dfdl:inputValueCalc="{ ../tns:x * ../tns:y }"/>
<element name="Add" type="xsd:float"
dfdl:inputValueCalc="{ ../tns:x + ../tns:y }"/>
<element name="Substract" type="xsd:float"
dfdl:inputValueCalc="{ ../tns:x - ../tns:y }"/>
<element name="SubstractLiteral" type="xsd:float"
dfdl:inputValueCalc="{ ../tns:x - 2 }"/>
</sequence>
</complexType>
</element>
</schema>