Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting validationMode to NONE in org.springframework.beans.factory.xml.XmlBeanDefinitionReader disables namespace support [SPR-6336] #11002

Closed
spring-projects-issues opened this issue Nov 12, 2009 · 4 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Olaf Otto opened SPR-6336 and commented

When changing the validationMode to XmlBeanDefinitionReader.VALIDATION_NONE, the context will silently ignore schema-based configuration such as:
<aop:scoped-proxy proxy-target-class="true"/>
whereas this setting should only affect the validation phase and not the semantics of the context IMHO.
This is very likely due to the XmlBeanDefinitionReader.namespaceAware property being set to true for validation modes other than NONE.


Affects: 2.5.6

Attachments:

Referenced from: commits a6bba67

@spring-projects-issues
Copy link
Collaborator Author

Olaf Otto commented

Attached a Junit4 test case reproducing the validationMode issue.

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

This is because of schema namespace awareness having to be explicitly enabled for JAXP parsers: If you turn off schema validation, you'll have to turn on schema namespaces through a dedicated reader.setNamespaceAware(true) call yourself. We are combining those two in a setValidating(boolean) method in other places; I might add that to XmlBeanDefinitionReader itself as well.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Olaf Otto commented

Hello Juergen,

Excellent, thank you for the quick reply. It would be great if the behavior you described would be mentioned in the XmlBeanDefinitionReader's javadoc, too.

Olaf

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Added setValidating(boolean) to XmlBeanDefinitionReader as well, managing validationMode and namespaceAware in conjunction.

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants