Permalink
Browse files

Fixes #37 - JDOMSource now sets SystemID if there is a Document.getBa…

…seURI()
  • Loading branch information...
1 parent b5dd444 commit 5e6b89e19e2e6a4e9f9e26662a586037b557a425 @rolfl rolfl committed Feb 1, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 core/src/java/org/jdom2/transform/JDOMSource.java
@@ -151,7 +151,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* <code>null</code>.
*/
public JDOMSource(Document source) {
- setDocument(source);
+ this(source, null);
}
/**
@@ -199,6 +199,9 @@ public JDOMSource(Element source) {
public JDOMSource(Document source, EntityResolver resolver) {
setDocument(source);
this.resolver = resolver;
+ if (source.getBaseURI() != null) {
+ super.setSystemId(source.getBaseURI());
+ }
}
/**

0 comments on commit 5e6b89e

Please sign in to comment.