150 Chapter 5 " XML Digital Signatures n Enveloping form  The document is within the signature, as shown in the following example: <signature> <document>...</document> </signature> n Detached form  The signature references a document that is elsewhere through a universal resource identifier (URI), as shown in the following example:. <signature>...</signature> These are just the basic forms; remember, those one or more and zero or more sections of the specification. An XML digital signature can not only sign more than one document, but it could also be simultaneously more than one of the enveloped, enveloping, and detached forms. NOTE A universal resource locator (URL) is considered informal and is no longer used in technical documents; URI is used instead. A URI has a name asso- ciated with it and is of the form Name=URI. Examples of XML Signatures In order to make this discussion less abstract, we now present some sample XML digital signatures.There are libraries that implement XML digital signatures for many languages, including C, Perl, Java, and many others. (See the Vendor Toolkits section toward the end of the chapter.) However, since the XML digital signature specification is relatively new, almost all these libraries are in a state of flux.This means that the application programming interfaces (APIs) for each lan- guage has yet to settle down; therefore, instead of showing code to use these libraries, which will most likely become obsolete in a short period of time, we explain the steps in a more generic manner. The first step is to generate a signature private key (see the Tools & Traps sidebar) and to save it someplace safe. www.syngress.com