> Following up on kb's thread on signing less than the whole document, I > would like to ask how to use the API to sign a sub-tree of my document. It is > easy for me to retrieve the sub-tree (i.e. the parent element) because it's > unique.
Retrieving it via some kind of DOM call is not relevant, referencing it in an expression (URI or XPath) is what has to happen. You start with the Reference URI in the signature and then move to the Transforms that modify the reference by chopping out parts or pointing at something inside the whole node set. > But I don't quite get how I can apply the API to it: the Transforms element I > would need to create either accepts a Document in its constructor or another > Transforms element, but not an Element. I surely don't have to convert my > sub-tree into a Document, sign that, and pass it back? I suggest you read the XML Signature spec before you go much farther, it's really mandatory to understand some of that to use the library properly. At least for the type of signature you're planning to use and what the processing model is. -- Scott