  In this paper we determine a classification of the endomorphisms of the Artin
group $A [D_n]$ of type $D_n$ for $n\ge 6$. In particular we determine its
automorphism group and its outer automorphism group. We also determine a
classification of the homomorphisms from $A[D_n]$ to the Artin group $A
[A_{n-1}]$ of type $A_{n-1}$ and a classification of the homomorphisms from
$A[A_{n-1}]$ to $A[D_n]$ for $n\ge 6$. We show that any endomorphism of the
quotient $A [D_n] / Z (A [D_n])$ lifts to an endomorphism of $A [D_n]$ for $n
\ge 4$. We deduce a classification of the endomorphisms of $A [D_n] / Z (A
[D_n])$, we determine the automorphism and outer automorphism groups of $A
[D_n] / Z (A [D_n])$, and we show that $A [D_n] / Z (A [D_n])$ is co-Hopfian,
for $n \ge 6$. The results are algebraic in nature but the proofs are based on
topological arguments (curves on surfaces and mapping class groups).
