Skip to content

set systemId on InputSource before parsing configuration #28

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

Closed
wants to merge 3 commits into from
Closed

set systemId on InputSource before parsing configuration #28

wants to merge 3 commits into from

Conversation

swachter
Copy link

@swachter swachter commented Feb 7, 2012

When the systemId is set then the baseURI property of the created w3c nodes is available. This would help to resolve relative resources (for example in custom NamespaceHandlers).

@cbeams
Copy link
Contributor

cbeams commented Feb 7, 2012

Hi Stefan,

Could you provide a little more background here, i.e. the use case that prompted these changes?

Also, please provide a JUnit test (or consider modifying the existing XmlBeanDefinitionReaderTests).

@swachter
Copy link
Author

swachter commented Feb 8, 2012

I wrote a custom NamespaceHandler that allows to embed OASIS XML catalogs in Spring configurations. The catalog entries may contain relative URLs that should be resolved relative to the catalog, i.e. the Spring configuration.

I will try to supply a unit test and push it into my pull request.

@swachter
Copy link
Author

swachter commented Feb 9, 2012

I changed the patch slightly and added the XmlBeanDefinitionReaderTests.testBaseUri method.

@cbeams
Copy link
Contributor

cbeams commented May 1, 2012

@swachter,

This looks like a reasonable addition, but there are a number of things that need to be touched up before your changes can be merged.

First, please read the contributor guidelines completely. You'll find instructions there on each of the following items:

  • indicate that you have signed the SpringSource contributor license agreement
  • fix whitespace errors, e.g. use tabs not spaces and eliminate all trailing whitespace
  • squash/rebase into a single commit
  • create a JIRA issue corresponding to this pull request
  • follow the commit comment formatting guidelines
  • issue the pull request from a branch with the same name as the JIRA issue
  • issue the pull request against master, not 3.1.x (backports will be considered by the team later).

Note that you'll need to issue a separate pull request in order to change the branch name. Just reference this pull request in the new one by typing #28 somewhere in the request.

The best thing to do is to sync up to the latest sources from SpringSource/spring-framework, create a new branch called SPR-#### from the master branch, apply your changes there, touch up the items mentioned above and issue a new pull request from that branch. Shouldn't take too long.

For now, I'm closing this pull request in anticipation of the new one.

Thanks for taking the time to contribute!

@cbeams cbeams closed this May 1, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants