When add a new closet in an existing space, should I attach the bottom plate to the flooring or the subfloor?
If you're not removing any of the existing structure, you can absolutely frame on top of the existing floor. Same goes for the walls and ceiling, you can frame your new walls without removing anything else (unless you need to run wires or something). One thing to check, however, is which way the existing ceiling joists are running. Depending on how long your new walls are, you might want to cut out the ceiling where the new walls go so you can add some 'nailers' (small blocks of wood) to run between the existing ceiling joists, so the top of your new wall is firmly fastened to the framing.