Validate xml through xsd. Implict schema declaration.

Hi all.
I'v managed to register xsd schema(through StandartResourceProvider) and it works pretty for xml files, where I declared xlmns="SOME_URL" attribute.

Can I somehow attach this scheme to all xml files, based on their extension? Yes, I already have custom FileType for this files.

Can I get validation results? If there some error in xml, how can I knew about it while processing file?

Thanks in advance!

Comment actions Permalink

Hi, to provide the schema you need to implement XmlSchemaProvider extension point.
Currently there is no open API for getting highlighting results directly, you may look at some code at DaemonCodeAnalyzerImpl.runPasses().

Comment actions Permalink

Thank's for answer, Dmitry!

Sorry. But I'm think, my poor English makes a confusion here. I'm looking some way to set default namespace to all xml files with given extension. And still can't understand how.

Schema is already provided and I can see it in autocomplete popup and in action, when editing document with manually specified xmlns attribute.

Did I misunderstand something?

Comment actions Permalink


Namespace alone cannot provide validation and autocomplete. You must be missing the Schema Instance and its schemaLocation attribute.

<Resource xmlns=""



Please sign in to leave a comment.