The energy dependence of the branching ratios in dissociative recombination of DCO+ with a known small admixture of DOC+ has been measured for collision energies from 0 to 25eV using an energy- and position-sensitive surface barrier detector which is designed for the analysis of multi-fragment events occurring in a molecular fragmentation study. The measurements are compared with theoretical calculations on the direct mechanism of dissociative recombination of HCO+ including the contribution from HOC+ at the experimental abundance fraction. At low collision energies, dissociative recombination of HCO+ is dominated by dissociation into H + CO. For collision energies above 2eV there is a transition into dissociation to HC+O, which can be explained by electron capture into resonant states. Signatures of DOC+ dissociative recombination are found experimentally and confirmed by the calculations for HOC+. Three-body breakup becomes important for collision energies above 6eV.