Composition relation between gap solitons and bloch waves in nonlinear periodic systems