Is it possible to assign the enveloped Signature as a subchild that is in a different namespace than the document you've signed of you XML Document?
For example:
<?xml version="1.0" encoding="UTF-8"?>
<Message xmlns="http://www.w3.org/2001/XMLSchema-instance" xmlns:a="myNamespace">
<Header>
<head:sgntr xmlns:head="myHeader"></head:sgntr>
</Header>
<Data>
<a:DataEntry>some data</a:DataEntry>
<a:DataEntry>some data</a:DataEntry>
</Data>
</Message>
Calculate your Signature with the canonicalization method XmlDsigC14NTransform and then place it in the sgntr node. Issue that I face is that 3rd party software cannot validate my XML, if I replace the signature to the last node of the XML Document the 3rd party can validate it successfully.