I'm not sure what the cause of your confusion is exactly. In the sample code when it is calling "sig.addDocument(URI)" it is signing the XML document available at that URI. The Javaworld tutorial you linked to does not sign any external resource.
I'm not sure what to recommend in terms of helping to better understand the library. I guess continue going through the rest of the samples and then take a look at the unit tests in the source code for more in-depth testing. I guess we could do with some tutorials on the webpage... Colm. On Sat, Nov 24, 2012 at 8:45 PM, Charles Brown <[email protected]>wrote: > Hello, > > I am very new here and I started learning Apache Santuario. I went through > java samples. The first java sample I have chosen for learning is > CreateSignature.java. > > I could understand following code at line 142 to 151 > > { > //Add in 2 external URIs. This is a detached Reference. > // > // When sign() is called, two network connections are made. -- > well, > // not really, as we use the OfflineResolver which acts as a > proxy for > // these two resouces ;-)) > // > sig.addDocument("http://www.w3.org/TR/xml-stylesheet"); > sig.addDocument(" > http://www.nue.et-inf.uni-siegen.de/index.html"); > } > > > Why following is required? I went through one very old tutorial at > JavaWorld, I did not find this in that tutorial. > The link for this JavaWorld tutorial is > http://www.javaworld.com/javaworld/jw-12-2002/jw-1220-xmlsecurity.html?page=6 > > sig.addDocument("http://www.w3.org/TR/xml-stylesheet"); > sig.addDocument("http://www.nue.et-inf.uni-siegen.de/index.html"); > > Also, I will be happy if I get proper direction to learning Santuario. > Which Samples should I try to learn next. > > Thank you. > -- Colm O hEigeartaigh Talend Community Coder http://coders.talend.com
