Bragg reflection from a cholesteric liquid-crystal slab in the framework of nonlinear optics