SourceTypeAction (content aware pipeline)  can detect the "Public Identifier" from the Document Type Declaration, which is how most of Forrest operates.
SourceTypeAction can also use "namespace" or "processing instruction".
I chose the "processing instruction" method. This enables an elegant solution for tools to know the content type, and does not say anything about a particular schema language that could be used to process it.
The instance document declares its schema, e.g.
Validation is done as a separate concern .
 SourceTypeAction (content aware pipelines)
 Using Cocoon Validation Transformers