You can then validate some Element Tree document against the schema.
Pass an Element or Element Tree object to construct a Schematron validator: .
Schematron automatically converts these parameters to stylesheet parameters so you need not worry to set string parameters using quotes or to use XSLT.strparam().
In my scenario I have an XML SOAP Envelope document with just a SOAP: Envelope and SOAP: Body with the body content being the content that is to be signed.
The document looks like this: in the signature section.
Ironically the service that is being accessed accepts SOAP data but the service does not expose any WSDL even though it uses some WS-* specification features - namely digital signature of the XML body of the message.
Since I didn't have much luck finding the information I needed in one place I thought I'd write it up here, so it hopefully helps out some of you (and myself) in the future.
All you have to do is use a parser that has DTD validation enabled: option, which loads the DTD and weaves attribute default values into the document.
Again, no validation is performed unless explicitly requested.
For quick review: When signing a document you'll use a Private key to sign a portion of the the document and embed a signature into the document.
You then use a Public key to validate the signature when reading the document.
When you create a key with Windows using the The latter step is optional but I prefer to assign a friendly key name so its easier to reference the key.