O'Reilly logo

Secure XML: The New Syntax for Signatures and Encryption by Kitty Niles, Donald E. Eastlake

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

KeyInfo Element Syntax

In this chapter, the following namespace prefixes are used for the sake of brevity:

xmlns:ds='http://www.w3.org/2000/09/xmldsig#'
xmlns:enc='http://www.w3.org/2001/04/xmlenc#'
xmlns:dsm='http://www.w3.org/2001/04/xmldsig-more#'

The syntax for KeyInfo, as defined in XMLDSIG, follows:

<!-- XMLDSIG KeyInfo DTD -->

<!ELEMENT KeyInfo (#PCDATA|KeyName|KeyValue|RetrievalMethod|
                   X509Data|PGPData|SPKIData|MgmtData
                   %KeyInfo.ANY;)* >
<!ATTLIST KeyInfo
          Id  ID   #IMPLIED >

In schema notation, it has the following form:

 <!-- KeyInfo schema --> <element name="KeyInfo" type="ds:KeyInfoType"/> <complexType name="KeyInfoType" mixed="true"> <choice maxOccurs="unbounded"> <element ref="ds:KeyName"/> <element ref="ds:KeyValue"/> <element ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required