Must you people question every thought and feeling in the characters heads at every point in the game?
No, Namine did not know Sora before he entered castle oblivion, or at least if she did, we do not know of it yet. The point of KH: COM was to make money from the KH licence without advancing the plot in any way. If she knew sora at an earlier age, which I highly doubt, because it's just plain bad scripting, then it will be revealed in KH2. Wait a few months, will ya?