Insoluble salts are best prepared (ie. for maximum yield) by
mixing two suitable aqueous solutions that when
combined, contains the desired cations and anions of the
insoluble salt.
So it doesn't matter whether one of the solutions happens to be
an acid or a salt, as long as the desired ion is present.
In other words, when mixing
(i) aqueous hydrochloric acid + silver nitrate
solution,
or
(ii) sodium chloride solution + silver nitrate solution,
The ionic equation is exactly the same :
Cl-(aq) + Ag+(aq) ---> AgCl(s)
It's only the spectator ions which are different. The spectator
ions from (i) are H+(aq) and NO3-(aq), hence the filtrate would be
nitric(V) acid. In (ii), the spectator ions are Na+(aq) and
NO3-(aq), hence the filtrate would be sodium nitrate solution.
But you don't really care about the spectator ions, coz as far
as you're concerned, you really only want the insoluble silver
chloride precipitate salt.