Template:ISBN-10/doc

This template detects and then converts valid ISBN-13 numbers beginning with "978" to equivalent ISBN-10 ones. Anything else passes through unchanged.

It is designed to work with the  produced by Special:BookSources. That page removes punctuation from the supplied ISBN before generating, so this template does not need to handle punctuated or other formatted ISBN numbers. Symmetrically, it outputs unformatted ISBN-10 numbers.

Amazon ASIN product codes for books are ISBN-10. Converting ISBN-13 numbers to ISBN-10 makes it possible to create URLs that directly reference books at Amazon, and without needing to use an intermediate Amazon search page. ISBN-13 replaced ISBN-10 in 2007. ISBNs that start with "979" have no equivalent ISBN-10, and so pass through unchanged.

Usage
Invoke with:

Test cases
Valid conversions:

Unachievable conversions:

Invariant cases:

Invalid inputs: