A lot of systems work with a
lot of things. The question is what belongs in the compiler and core language, and
why it's taking up time in my compile step -- this latter question being particularly fair game in the Scala ecosystem, with its almost-legendarily slow compile times.
A tool to check that my XML is valid: great! Yes, please! Great; but that's not a language's job.
Write a tool for it and invoke it in another step in your build process. Call it a linter because that's what it is: a linter is a process that checks other documents for correctness.
Type inference for a language and XML grammar checking don't belong in the same process; they just don't. Only sadness and wasted (human, and machine alike) time can come of it.