use of org.apache.axiom.core.stream.StreamException in project webservices-axiom by apache.
the class ContentHandlerXmlHandler method endProcessingInstruction.
@Override
public void endProcessingInstruction() throws StreamException {
try {
contentHandler.processingInstruction(piTarget, accumulator.toString());
accumulator.clear();
piTarget = null;
characterDataMode = CharacterDataMode.PASS_THROUGH;
} catch (SAXException ex) {
throw new StreamException(ex);
}
}
use of org.apache.axiom.core.stream.StreamException in project webservices-axiom by apache.
the class Serializer method externalEntityDecl.
/**
* Report a parsed external entity declaration.
*
* <p>Only the effective (first) declaration for each entity
* will be reported.</p>
*
* @param name The name of the entity. If it is a parameter
* entity, the name will begin with '%'.
* @param publicId The declared public identifier of the entity, or
* null if none was declared.
* @param systemId The declared system identifier of the entity.
* @exception StreamException The application may raise an exception.
* @see #internalEntityDecl
* @see org.xml.sax.DTDHandler#unparsedEntityDecl
*/
public void externalEntityDecl(String name, String publicId, String systemId) throws StreamException {
try {
DTDprolog();
writer.write("<!ENTITY ");
writer.write(name);
if (publicId != null) {
writer.write(" PUBLIC \"");
writer.write(publicId);
} else {
writer.write(" SYSTEM \"");
writer.write(systemId);
}
writer.write("\" >\n");
} catch (IOException ex) {
throw new StreamException(ex);
}
}
use of org.apache.axiom.core.stream.StreamException in project webservices-axiom by apache.
the class Serializer method switchContext.
private void switchContext(int context) throws StreamException {
this.context = context;
try {
writer.setUnmappableCharacterHandler(unmappableCharacterHandlers[context]);
} catch (IOException ex) {
throw new StreamException(ex);
}
matchedIllegalCharacters = 0;
squareBrackets = 0;
}
use of org.apache.axiom.core.stream.StreamException in project webservices-axiom by apache.
the class Serializer method writeInternalSubset.
public void writeInternalSubset(String internalSubset) throws StreamException {
try {
DTDprolog();
writer.write(internalSubset);
} catch (IOException ex) {
throw new StreamException(ex);
}
}
use of org.apache.axiom.core.stream.StreamException in project webservices-axiom by apache.
the class Serializer method elementDecl.
/**
* Report an element type declaration.
*
* <p>The content model will consist of the string "EMPTY", the
* string "ANY", or a parenthesised group, optionally followed
* by an occurrence indicator. The model will be normalized so
* that all whitespace is removed,and will include the enclosing
* parentheses.</p>
*
* @param name The element type name.
* @param model The content model as a normalized string.
* @exception StreamException The application may raise an exception.
*/
public void elementDecl(String name, String model) throws StreamException {
try {
DTDprolog();
writer.write("<!ELEMENT ");
writer.write(name);
writer.write(' ');
writer.write(model);
writer.write(">\n");
} catch (IOException ex) {
throw new StreamException(ex);
}
}
Aggregations