summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.3.3/modules
diff options
context:
space:
mode:
Diffstat (limited to 'branches/sca-java-1.3.3/modules')
-rw-r--r--branches/sca-java-1.3.3/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/TuscanyXMLStreamReader.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/branches/sca-java-1.3.3/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/TuscanyXMLStreamReader.java b/branches/sca-java-1.3.3/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/TuscanyXMLStreamReader.java
index 3fd7bded68..f2afe419a3 100644
--- a/branches/sca-java-1.3.3/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/TuscanyXMLStreamReader.java
+++ b/branches/sca-java-1.3.3/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/TuscanyXMLStreamReader.java
@@ -35,12 +35,14 @@ public class TuscanyXMLStreamReader extends StreamReaderDelegate implements XMLS
Stack<List<String>[]> context = new Stack<List<String>[]>();
+ String characterEncodingScheme;
List<String>[] contextList;
List<String> prefixList;
List<String> uriList;
public TuscanyXMLStreamReader(XMLStreamReader reader) {
super(reader);
+ this.saveCharacterEncodingScheme();
}
public void pushContext() throws XMLStreamException {
@@ -68,6 +70,10 @@ public class TuscanyXMLStreamReader extends StreamReaderDelegate implements XMLS
public void popContext() throws XMLStreamException {
context.pop();
}
+
+ public void saveCharacterEncodingScheme() {
+ this.characterEncodingScheme = super.getCharacterEncodingScheme();
+ }
/*
* Overriding the next() method to perform PUSH and POP operations
@@ -93,6 +99,7 @@ public class TuscanyXMLStreamReader extends StreamReaderDelegate implements XMLS
@Override
public int nextTag() throws XMLStreamException {
int event = super.nextTag();
+
if (event == START_ELEMENT) {
pushContext();
}
@@ -106,4 +113,10 @@ public class TuscanyXMLStreamReader extends StreamReaderDelegate implements XMLS
public NamespaceContext getNamespaceContext() {
return new TuscanyNamespaceContext((Stack<List<String>[]>)context.clone());
}
-}
+
+
+ @Override
+ public String getCharacterEncodingScheme() {
+ return characterEncodingScheme;
+ }
+} \ No newline at end of file