I’m trying to develop a custom spring namespace that works like the built-in ‘p’ namespace:
http://www.springframework.org/schema/p
The problem I’m encountering is that Spring is trying to validate against my custom schema. (Which, like the Spring ‘p’ schema, doesn’t really exist). Reading through the original announcement of the P schema, Spring seems to somehow suppress validation for this schema:
http://blog.springsource.org/2006/11/25/xml-syntax-sugar-in-spring-20/
Reading through the Spring code, I have no idea how this is being done. Can anybody offer suggestions on how to suppress validation for my custom ‘schema’?
See file
org.springframework.beans-3.1.1.RELEASE.jar\META-INF\spring.handlersthere’s this line:which tells Spring how to handle this namespace.
Also notice, that there’s no XSD for this namespace (in
xsi:schemaLocation), so parsing this XML doesn’t require looking (resolving) any external schema. Namespace is just namespace – it could have form of e.g.,urn:test:1.0.