Add two hexBinarys with XPATH 1.0
- by fielding
Hi,
my xml document looks somewhat like that (Values are both xsl:hexBinary):
<Offsets>
<Offset>
<Name>ErrorOffset</Name>
<Value>DD</Value>
</Offset>
<Offset>
<Name>OtherOffset</Name>
<Value>FF</Value>
</Offset>
</Offsets>
<Value>
<Name>Error1</Name>
<Code>01</Code>
</Value>
<Value>
<Name>Error2</Name>
<Code>02</Code>
<Offset>ErrorOffset</Offset>
</Value>
now i want to transform this to a new xml file:
<Value>
<Name>Error1</Name>
<Code>01</Code>
</Value>
<Value>
<Name>Error2</Name>
<Code>DF</Code>
</Value>
All that should happen is adding <Offset> to the basic <Value>. But plain + returns NaN and sum() expects only one parameter. XSLT and XPATH are quite nice, but it goes on my nerves that easy operations like adding two hex values just dont work as easy as it should.