You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2016/02/27 22:28:16 UTC
svn commit: r1732668 - in /webservices/axiom/trunk/aspects:
core-aspects/src/main/java/org/apache/axiom/core/
core-aspects/src/main/java/org/apache/axiom/core/impl/
core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/
om-aspects/src/main/java/o...
Author: veithen
Date: Sat Feb 27 21:28:16 2016
New Revision: 1732668
URL: http://svn.apache.org/viewvc?rev=1732668&view=rev
Log:
Create the infrastructure to support incremental serialization.
Added:
webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreModelStreamException.java (with props)
webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/TreeWalkerImpl.java (with props)
Modified:
webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreCDATASectionSupport.aj
webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreCommentSupport.aj
webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreDocumentSupport.aj
webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreNSAwareElementSupport.aj
webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreParentNodeSupport.aj
webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreProcessingInstructionSupport.aj
webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/Context.java
Added: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreModelStreamException.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreModelStreamException.java?rev=1732668&view=auto
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreModelStreamException.java (added)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreModelStreamException.java Sat Feb 27 21:28:16 2016
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axiom.core;
+
+import org.apache.axiom.core.stream.StreamException;
+
+/**
+ * {@link StreamException} wrapper for {@link CoreModelException} used by the {@link XmlInput}
+ * returned by {@link CoreParentNode#coreGetInput(boolean)}.
+ */
+public class CoreModelStreamException extends StreamException {
+ private static final long serialVersionUID = 1L;
+
+ public CoreModelStreamException(CoreModelException cause) {
+ super(cause);
+ }
+
+ @Override
+ public Throwable initCause(Throwable cause) {
+ if (!(cause instanceof CoreModelException)) {
+ throw new IllegalArgumentException();
+ }
+ return super.initCause(cause);
+ }
+
+ /**
+ * Get the {@link CoreModelException} wrapped by this exception.
+ *
+ * @return the wrapped exception
+ */
+ public CoreModelException getCoreModelException() {
+ return (CoreModelException)getCause();
+ }
+}
Propchange: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/CoreModelStreamException.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/TreeWalkerImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/TreeWalkerImpl.java?rev=1732668&view=auto
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/TreeWalkerImpl.java (added)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/TreeWalkerImpl.java Sat Feb 27 21:28:16 2016
@@ -0,0 +1,267 @@
+/*
+ * Copyright 2009-2011,2013 Andreas Veithen
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axiom.core.impl;
+
+import org.apache.axiom.core.CoreAttribute;
+import org.apache.axiom.core.CoreChildNode;
+import org.apache.axiom.core.CoreDocument;
+import org.apache.axiom.core.CoreElement;
+import org.apache.axiom.core.CoreLeafNode;
+import org.apache.axiom.core.CoreModelException;
+import org.apache.axiom.core.CoreModelStreamException;
+import org.apache.axiom.core.CoreNSAwareElement;
+import org.apache.axiom.core.CoreNode;
+import org.apache.axiom.core.CoreParentNode;
+import org.apache.axiom.core.NodeConsumedException;
+import org.apache.axiom.core.stream.DocumentElementExtractingFilterHandler;
+import org.apache.axiom.core.stream.StreamException;
+import org.apache.axiom.core.stream.XmlHandler;
+import org.apache.axiom.core.stream.XmlInput;
+import org.apache.axiom.core.stream.XmlReader;
+
+public final class TreeWalkerImpl implements XmlReader {
+ private static final int STATE_NONE = 0;
+
+ /**
+ * Indicates that the serializer is synthesizing a start fragment event. This state can only be
+ * reached if the root node is not a document.
+ */
+ private static final int STATE_START_FRAGMENT = 1;
+
+ /**
+ * Indicates that the current node is a leaf node.
+ */
+ private static final int STATE_LEAF = 2;
+
+ /**
+ * Indicates that the current node is a parent node and that events for child nodes have not yet
+ * been generated.
+ */
+ private static final int STATE_NOT_VISITED = 3;
+
+ /**
+ * Indicates that the current node is an element and that events for its attribute nodes have
+ * already been generated.
+ */
+ private static final int STATE_ATTRIBUTES_VISITED = 4;
+
+ /**
+ * Indicates that the current node is a parent node and that events for child nodes have already
+ * been generated.
+ */
+ private static final int STATE_VISITED = 5;
+
+ /**
+ * Indicates that the current node is a parent node for which the builder has been
+ * put into pass through mode. In this state, events are not synthesized from the
+ * object model but passed through from the underlying XML source used to build the
+ * tree. This state is only reachable if {@link #preserve} is <code>true</code>.
+ */
+ private static final int STATE_PASS_THROUGH = 6;
+
+ private static final int STATE_STREAMING = 7;
+
+ private static final int STATE_ATTRIBUTE = 8;
+
+ private final XmlHandler handler;
+ private final CoreParentNode root;
+ private final boolean preserve;
+ private CoreNode node;
+
+ /**
+ * The stream from which events are included. This is only set if {@link #state} is
+ * {@link #STATE_STREAMING}.
+ */
+ private XmlReader reader;
+
+ private int state = STATE_NONE;
+
+ public TreeWalkerImpl(XmlHandler handler, CoreParentNode root, boolean preserve) {
+ this.handler = handler;
+ this.root = root;
+ this.preserve = preserve;
+ }
+
+ @Override
+ public boolean proceed() throws StreamException {
+ try {
+ // Determine the next node (i.e. the node for which the next event is generated) and
+ // update the state
+ final CoreNode previousNode = node;
+ final CoreNode nextNode;
+ if (state == STATE_PASS_THROUGH || state == STATE_STREAMING) {
+ nextNode = previousNode;
+ } else if (previousNode == null) {
+ if (state == STATE_NONE && !(root instanceof CoreDocument)) {
+ nextNode = null;
+ state = STATE_START_FRAGMENT;
+ } else {
+ nextNode = root;
+ state = STATE_NOT_VISITED;
+ }
+ } else if (state == STATE_VISITED && previousNode == root) {
+ nextNode = null;
+ } else if (state == STATE_NOT_VISITED && previousNode instanceof CoreElement) {
+ final CoreElement element = (CoreElement)previousNode;
+ // TODO: handle case with preserve == false
+ CoreAttribute firstAttribute = element.coreGetFirstAttribute();
+ if (firstAttribute == null) {
+ nextNode = element;
+ state = STATE_ATTRIBUTES_VISITED;
+ } else {
+ nextNode = firstAttribute;
+ state = STATE_NOT_VISITED;
+ }
+ } else if (state == STATE_NOT_VISITED || state == STATE_ATTRIBUTES_VISITED) {
+ final CoreParentNode parent = (CoreParentNode)previousNode;
+ int nodeState = parent.getState();
+ if (preserve || nodeState == CoreParentNode.COMPLETE || nodeState == CoreParentNode.COMPACT) {
+ // TODO: bad because it will expand the node if the state is COMPACT
+ CoreChildNode child = parent.coreGetFirstChild();
+ if (child == null) {
+ nextNode = parent;
+ state = STATE_VISITED;
+ } else {
+ nextNode = child;
+ state = STATE_NOT_VISITED;
+ }
+ } else {
+ CoreChildNode child = parent.coreGetFirstChildIfAvailable();
+ if (child == null) {
+ nextNode = parent;
+ if (nodeState == CoreParentNode.DISCARDED) {
+ throw new NodeConsumedException();
+ }
+ parent.coreGetInputContext().setPassThroughHandler(handler);
+ state = STATE_PASS_THROUGH;
+ } else {
+ nextNode = child;
+ state = STATE_NOT_VISITED;
+ }
+ }
+ } else if (previousNode instanceof CoreChildNode) {
+ final CoreChildNode previousChildNode = (CoreChildNode)previousNode;
+ if (preserve) {
+ CoreChildNode sibling = previousChildNode.coreGetNextSibling();
+ if (sibling == null) {
+ nextNode = previousChildNode.coreGetParent();
+ state = STATE_VISITED;
+ } else {
+ nextNode = sibling;
+ state = STATE_NOT_VISITED;
+ }
+ } else {
+ CoreChildNode sibling = previousChildNode.coreGetNextSiblingIfAvailable();
+ if (sibling == null) {
+ CoreParentNode parent = previousChildNode.coreGetParent();
+ nextNode = parent;
+ int nodeState = parent.getState();
+
+ // TODO: <hack>
+ if (nodeState == CoreParentNode.INCOMPLETE && parent.coreGetInputContext() == null) {
+ nodeState = CoreParentNode.COMPLETE;
+ }
+ // </hack>
+
+ if (nodeState == CoreParentNode.COMPLETE) {
+ state = STATE_VISITED;
+ } else if (nodeState == CoreParentNode.DISCARDED) {
+ throw new NodeConsumedException();
+ } else {
+ parent.coreGetInputContext().setPassThroughHandler(handler);
+ state = STATE_PASS_THROUGH;
+ }
+ } else {
+ nextNode = sibling;
+ state = STATE_NOT_VISITED;
+ }
+ }
+ } else {
+ final CoreAttribute attribute = (CoreAttribute)previousNode;
+ // TODO: handle case with preserve == false
+ CoreAttribute nextAttribute = attribute.coreGetNextAttribute();
+ if (nextAttribute == null) {
+ nextNode = attribute.coreGetOwnerElement();
+ state = STATE_ATTRIBUTES_VISITED;
+ } else {
+ nextNode = nextAttribute;
+ state = STATE_NOT_VISITED;
+ }
+ }
+
+ // More closely examine the case where we move to a node that has not
+ // been visited yet. It may be a sourced element or a leaf node
+ if (state == STATE_NOT_VISITED) {
+ if (nextNode instanceof CoreNSAwareElement) {
+ XmlInput input = ((CoreNSAwareElement)nextNode).getXmlInput(preserve);
+ if (input != null) {
+ reader = input.createReader(new DocumentElementExtractingFilterHandler(handler));
+ state = STATE_STREAMING;
+ }
+ } else if (nextNode instanceof CoreLeafNode) {
+ state = STATE_LEAF;
+ } else if (nextNode instanceof CoreAttribute) {
+ state = STATE_ATTRIBUTE;
+ }
+ }
+
+ switch (state) {
+ case STATE_START_FRAGMENT:
+// handler.startEntity(true, null);
+ break;
+ case STATE_LEAF:
+ ((CoreLeafNode)nextNode).internalSerialize(handler, preserve);
+ break;
+ case STATE_ATTRIBUTE:
+ ((CoreAttribute)nextNode).internalSerialize(handler, preserve);
+ break;
+ case STATE_NOT_VISITED:
+ ((CoreParentNode)nextNode).serializeStartEvent(handler);
+ break;
+ case STATE_ATTRIBUTES_VISITED:
+ handler.attributesCompleted();
+ break;
+ case STATE_VISITED:
+ if (nextNode == null) {
+// handler.completed();
+ } else {
+ ((CoreParentNode)nextNode).serializeEndEvent(handler);
+ }
+ break;
+ case STATE_PASS_THROUGH: {
+ CoreParentNode parent = (CoreParentNode)nextNode;
+ parent.coreGetInputContext().getBuilder().next();
+ if (parent.coreGetInputContext() == null) {
+ state = STATE_VISITED;
+ }
+ break;
+ }
+ case STATE_STREAMING:
+ if (reader.proceed()) {
+ state = STATE_VISITED;
+ reader = null;
+ }
+ break;
+ default:
+ throw new IllegalStateException();
+ }
+ node = nextNode;
+ return state == STATE_VISITED && (nextNode == null || nextNode instanceof CoreDocument);
+ } catch (CoreModelException ex) {
+ throw new CoreModelStreamException(ex);
+ }
+ }
+}
Propchange: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/TreeWalkerImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreCDATASectionSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreCDATASectionSupport.aj?rev=1732668&r1=1732667&r2=1732668&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreCDATASectionSupport.aj (original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreCDATASectionSupport.aj Sat Feb 27 21:28:16 2016
@@ -34,11 +34,11 @@ public aspect CoreCDATASectionSupport {
public final <T> void CoreCDATASection.init(ClonePolicy<T> policy, T options, CoreNode other) {
}
- final void CoreCDATASection.serializeStartEvent(XmlHandler handler) throws CoreModelException, StreamException {
+ public final void CoreCDATASection.serializeStartEvent(XmlHandler handler) throws CoreModelException, StreamException {
handler.startCDATASection();
}
- final void CoreCDATASection.serializeEndEvent(XmlHandler handler) throws StreamException {
+ public final void CoreCDATASection.serializeEndEvent(XmlHandler handler) throws StreamException {
handler.endCDATASection();
}
}
Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreCommentSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreCommentSupport.aj?rev=1732668&r1=1732667&r2=1732668&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreCommentSupport.aj (original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreCommentSupport.aj Sat Feb 27 21:28:16 2016
@@ -34,11 +34,11 @@ public aspect CoreCommentSupport {
public final <T> void CoreComment.init(ClonePolicy<T> policy, T options, CoreNode other) {
}
- final void CoreComment.serializeStartEvent(XmlHandler handler) throws CoreModelException, StreamException {
+ public final void CoreComment.serializeStartEvent(XmlHandler handler) throws CoreModelException, StreamException {
handler.startComment();
}
- final void CoreComment.serializeEndEvent(XmlHandler handler) throws StreamException {
+ public final void CoreComment.serializeEndEvent(XmlHandler handler) throws StreamException {
handler.endComment();
}
}
Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreDocumentSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreDocumentSupport.aj?rev=1732668&r1=1732667&r2=1732668&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreDocumentSupport.aj (original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreDocumentSupport.aj Sat Feb 27 21:28:16 2016
@@ -99,11 +99,11 @@ public aspect CoreDocumentSupport {
coreSetInputEncoding(o.coreGetInputEncoding());
}
- final void CoreDocument.serializeStartEvent(XmlHandler handler) throws CoreModelException, StreamException {
+ public final void CoreDocument.serializeStartEvent(XmlHandler handler) throws CoreModelException, StreamException {
handler.startDocument(coreGetInputEncoding(), coreGetXmlVersion(), coreGetXmlEncoding(), coreIsStandalone());
}
- final void CoreDocument.serializeEndEvent(XmlHandler handler) throws StreamException {
+ public final void CoreDocument.serializeEndEvent(XmlHandler handler) throws StreamException {
handler.endDocument();
}
}
Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreNSAwareElementSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreNSAwareElementSupport.aj?rev=1732668&r1=1732667&r2=1732668&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreNSAwareElementSupport.aj (original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreNSAwareElementSupport.aj Sat Feb 27 21:28:16 2016
@@ -18,11 +18,11 @@
*/
package org.apache.axiom.core.impl.mixin;
-import org.apache.axiom.core.CoreAttribute;
import org.apache.axiom.core.CoreModelException;
+import org.apache.axiom.core.CoreModelStreamException;
import org.apache.axiom.core.CoreNSAwareElement;
import org.apache.axiom.core.NodeType;
-import org.apache.axiom.core.stream.DocumentElementExtractingFilterHandler;
+import org.apache.axiom.core.impl.TreeWalkerImpl;
import org.apache.axiom.core.stream.StreamException;
import org.apache.axiom.core.stream.XmlHandler;
import org.apache.axiom.core.stream.XmlInput;
@@ -45,25 +45,22 @@ public aspect CoreNSAwareElementSupport
return null;
}
+ public final void CoreNSAwareElement.serializeStartEvent(XmlHandler handler) throws CoreModelException, StreamException {
+ handler.startElement(coreGetNamespaceURI(), coreGetLocalName(), coreGetPrefix());
+ }
+
+ public final void CoreNSAwareElement.serializeEndEvent(XmlHandler handler) throws StreamException {
+ handler.endElement();
+ }
+
public final void CoreNSAwareElement.internalSerialize(XmlHandler handler, boolean cache) throws CoreModelException, StreamException {
- XmlInput input = getXmlInput(cache);
- if (input != null) {
- // TODO: the serializer ignores namespaceURI and localName
- XmlReader reader = input.createReader(new DocumentElementExtractingFilterHandler(handler));
+ try {
+ XmlReader reader = new TreeWalkerImpl(handler, this, cache);
while (!reader.proceed()) {
// Just loop
}
- } else {
- forceExpand();
- handler.startElement(coreGetNamespaceURI(), coreGetLocalName(), coreGetPrefix());
- CoreAttribute attr = coreGetFirstAttribute();
- while (attr != null) {
- attr.internalSerialize(handler, true);
- attr = attr.coreGetNextAttribute();
- }
- handler.attributesCompleted();
- serializeChildren(handler, cache);
- handler.endElement();
+ } catch (CoreModelStreamException ex) {
+ throw ex.getCoreModelException();
}
}
}
Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreParentNodeSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreParentNodeSupport.aj?rev=1732668&r1=1732667&r2=1732668&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreParentNodeSupport.aj (original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreParentNodeSupport.aj Sat Feb 27 21:28:16 2016
@@ -359,11 +359,11 @@ public aspect CoreParentNodeSupport {
}
}
- void CoreParentNode.serializeStartEvent(XmlHandler handler) throws CoreModelException, StreamException {
+ public void CoreParentNode.serializeStartEvent(XmlHandler handler) throws CoreModelException, StreamException {
throw new UnsupportedOperationException();
}
- void CoreParentNode.serializeEndEvent(XmlHandler handler) throws StreamException {
+ public void CoreParentNode.serializeEndEvent(XmlHandler handler) throws StreamException {
throw new UnsupportedOperationException();
}
Modified: webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreProcessingInstructionSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreProcessingInstructionSupport.aj?rev=1732668&r1=1732667&r2=1732668&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreProcessingInstructionSupport.aj (original)
+++ webservices/axiom/trunk/aspects/core-aspects/src/main/java/org/apache/axiom/core/impl/mixin/CoreProcessingInstructionSupport.aj Sat Feb 27 21:28:16 2016
@@ -45,11 +45,11 @@ public aspect CoreProcessingInstructionS
target = ((CoreProcessingInstruction)other).target;
}
- final void CoreProcessingInstruction.serializeStartEvent(XmlHandler handler) throws CoreModelException, StreamException {
+ public final void CoreProcessingInstruction.serializeStartEvent(XmlHandler handler) throws CoreModelException, StreamException {
handler.startProcessingInstruction(coreGetTarget() + " ");
}
- final void CoreProcessingInstruction.serializeEndEvent(XmlHandler handler) throws StreamException {
+ public final void CoreProcessingInstruction.serializeEndEvent(XmlHandler handler) throws StreamException {
handler.endProcessingInstruction();
}
}
Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/Context.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/Context.java?rev=1732668&r1=1732667&r2=1732668&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/Context.java (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/Context.java Sat Feb 27 21:28:16 2016
@@ -168,10 +168,7 @@ public final class Context implements In
public Context endElement() throws StreamException {
if (passThroughHandler != null) {
- // TODO: hack
- if (passThroughDepth > 0) {
- passThroughHandler.endElement();
- }
+ passThroughHandler.endElement();
return decrementPassThroughDepth();
} else {
return endContext();