diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules')
-rw-r--r-- | sca-java-2.x/trunk/modules/common-xml/META-INF/MANIFEST.MF | 3 | ||||
-rw-r--r-- | sca-java-2.x/trunk/modules/common-xml/src/main/java/org/apache/tuscany/sca/common/xml/stax/StAXHelper.java | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/modules/common-xml/META-INF/MANIFEST.MF b/sca-java-2.x/trunk/modules/common-xml/META-INF/MANIFEST.MF index 53c9415364..0025ccea7d 100644 --- a/sca-java-2.x/trunk/modules/common-xml/META-INF/MANIFEST.MF +++ b/sca-java-2.x/trunk/modules/common-xml/META-INF/MANIFEST.MF @@ -29,7 +29,8 @@ Import-Package: javax.xml.datatype, org.xml.sax.helpers
Bundle-SymbolicName: org.apache.tuscany.sca.common.xml
Bundle-DocURL: http://www.apache.org/
-Export-Package: org.apache.tuscany.sca.common.xml;version="2.0.0";uses:="org.xml.sax",
+Export-Package: org.apache.tuscany.sca.common.xml;version="2.0.0";
+ uses:="org.xml.sax",
org.apache.tuscany.sca.common.xml.dom;version="2.0.0";
uses:="org.xml.sax.ext,
javax.xml.transform,
diff --git a/sca-java-2.x/trunk/modules/common-xml/src/main/java/org/apache/tuscany/sca/common/xml/stax/StAXHelper.java b/sca-java-2.x/trunk/modules/common-xml/src/main/java/org/apache/tuscany/sca/common/xml/stax/StAXHelper.java index df25cf1d1d..d7c85f01b5 100644 --- a/sca-java-2.x/trunk/modules/common-xml/src/main/java/org/apache/tuscany/sca/common/xml/stax/StAXHelper.java +++ b/sca-java-2.x/trunk/modules/common-xml/src/main/java/org/apache/tuscany/sca/common/xml/stax/StAXHelper.java @@ -44,6 +44,7 @@ import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import javax.xml.transform.Result; import javax.xml.transform.Source; +import javax.xml.transform.stream.StreamSource; import org.apache.tuscany.sca.common.xml.dom.DOMHelper; import org.apache.tuscany.sca.common.xml.stax.impl.StAX2SAXAdapter; @@ -134,7 +135,10 @@ public class StAXHelper { public XMLStreamReader createXMLStreamReader(URL url) throws XMLStreamException { try { - return createXMLStreamReader(openStream(url)); + // Set up a StreamSource from the url, since this has an associated URL that + // can be used by the parser to find references to other files such as DTDs + StreamSource scdlSource = new StreamSource( openStream(url), url.toString() ); + return inputFactory.createXMLStreamReader(scdlSource); } catch (IOException e) { throw new XMLStreamException(e); } |