I can't help with the technical details but can reassure you (at least for
your sanity) that PEs were a difficult problem when the spec was being
created - you'll see some discussion on XML-DEV about a year ago or
earlier. The current solution clarified the situation a lot. So I'd be
surprised if it was seriously broken.
P.
Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary
http://www.venus.co.uk/vhg