Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Canonical XML (c14n)

Prepare XML documents for plain-text comparisons and digital signatures

Contributors:  W3C

Summary:  Canonical XML lets you create a physical representation of an XML document that allows for the variations in XML syntax without changing the meaning. Discover more about this standard method, which is useful for testing and digital signatures, among other things.

Date:  25 Apr 2007 (Published 06 Feb 2007)
Level:  Intermediate

Activity:  4126 views
Comments:  

Canonical XML lets you create a physical representation of an XML document that allows for the variations in XML syntax without changing the meaning. Discover more about this standard method, which is useful for testing and digital signatures, among other things.

Canonical XML Version 1.0 [W3C Recommendation] is a standard method for generating a physical representation of an XML document, called the canonical form, that accounts for the variations allowed in XML syntax without changing meaning. For example, attribute order in XML is insignificant, so if one document has all its attributes sorted in alphabetical order and another is the same except that its attributes are sorted in some different way, then both documents are identical as far as XML 1.0 is concerned, despite the difference in the physical representation. This presents some practical problems. For example, say you want to have a digitally encrypted signature of a document to ensure that it isn't tampered with. A rearrangement of the attributes would break the signature, even though as far as XML standards are concerned, the document has not really changed. The solution is to convert documents to canonical form (a process called "canonicalization (c14n)") before signature, text comparison, or any other such operation. This ensures that changes insignificant in XML will be correctly accommodated. Work has begun on Canonical XML 1.1 [in development], which addresses several important problems with the 1.0 specification.

Sometimes the XML that needs to be compared or signed is actually just a portion of a bigger document. Even then, c14n generally must account for the entire source document in order to handle details such as namespace declarations. If you require c14n to be strictly limited to a document subset, then you must use the related algorithm Exclusive XML Canonicalization Version 1.0 [W3C Recommendation].


Resources

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=XML
ArticleID=193463
SummaryTitle=Canonical XML (c14n)
publish-date=04252007