Yes; a document must satisfy the grammar rules and the constraints.
> suggesting those are only valid in the external subset, yet the
> grammer leaves them out in many places where they are allowed in the
> external subset!
Earlier drafts of the standard attempted to indicate where paramater
entities could occur by special syntax in the grammar rules. This made
them very hard to read.
I think that to do this right would need two grammars; one for the
unexpanded source and one for the result after expansion.
-- Richard