Without a namespace or schema location there would be no way to tell which schema this particular XML file should be validated against. A new validator would have to be added utilizing a content descriptor that identifies this specific document. Note however that this would only incorporate validation and not content assist.
On 9/6/2010 4:49 AM, emPl wrote:
> I've got problem with validation of file, that doesn't have any
> namespace or schema definition.
> Is it possible to attach validator to xml file based on name of this file?
> I've got: config.xml and syntax like below:
> I can't add any xml schema definition or namespace definition.
Why not? You would otherwise have to write your own validator from
scratch and register it with the Validation Framework.
Eclipse WTP Source Editing and JSDT
As an alternative, a URI resolver that returns the corresponding schema could be contributed. It would have to use content type information to ensure the schema is only returned for this specific XML document.