code
stringlengths 11
173k
| docstring
stringlengths 2
593k
| func_name
stringlengths 2
189
| language
stringclasses 1
value | repo
stringclasses 833
values | path
stringlengths 11
294
| url
stringlengths 60
339
| license
stringclasses 4
values |
---|---|---|---|---|---|---|---|
public void cdata(char ch[], int start, int length)
throws org.xml.sax.SAXException
{
try
{
writeNormalizedChars(ch, start, length, m_lineSepUse);
if (m_tracer != null)
super.fireCDATAEvent(ch, start, length);
}
catch(IOException ioe)
{
throw new SAXException(ioe);
}
} |
Receive notification of cdata.
<p>The Parser will call this method to report each chunk of
character data. SAX parsers may return all contiguous character
data in a single chunk, or they may split it into several
chunks; however, all of the characters in any single event
must come from the same external entity, so that the Locator
provides useful information.</p>
<p>The application must not attempt to read from the array
outside of the specified range.</p>
<p>Note that some parsers will report whitespace using the
ignorableWhitespace() method rather than this one (validating
parsers must do so).</p>
@param ch The characters from the XML document.
@param start The start position in the array.
@param length The number of characters to read from the array.
@throws org.xml.sax.SAXException Any SAX exception, possibly
wrapping another exception.
@see #ignorableWhitespace
@see org.xml.sax.Locator
| ToTextStream::cdata | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToTextStream.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToTextStream.java | Apache-2.0 |
public void ignorableWhitespace(char ch[], int start, int length)
throws org.xml.sax.SAXException
{
try
{
writeNormalizedChars(ch, start, length, m_lineSepUse);
}
catch(IOException ioe)
{
throw new SAXException(ioe);
}
} |
Receive notification of ignorable whitespace in element content.
<p>Validating Parsers must use this method to report each chunk
of ignorable whitespace (see the W3C XML 1.0 recommendation,
section 2.10): non-validating parsers may also use this method
if they are capable of parsing and using content models.</p>
<p>SAX parsers may return all contiguous whitespace in a single
chunk, or they may split it into several chunks; however, all of
the characters in any single event must come from the same
external entity, so that the Locator provides useful
information.</p>
<p>The application must not attempt to read from the array
outside of the specified range.</p>
@param ch The characters from the XML document.
@param start The start position in the array.
@param length The number of characters to read from the array.
@throws org.xml.sax.SAXException Any SAX exception, possibly
wrapping another exception.
@see #characters
@throws org.xml.sax.SAXException
| ToTextStream::ignorableWhitespace | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToTextStream.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToTextStream.java | Apache-2.0 |
public void processingInstruction(String target, String data)
throws org.xml.sax.SAXException
{
// flush anything pending first
flushPending();
if (m_tracer != null)
super.fireEscapingEvent(target, data);
} |
Receive notification of a processing instruction.
<p>The Parser will invoke this method once for each processing
instruction found: note that processing instructions may occur
before or after the main document element.</p>
<p>A SAX parser should never report an XML declaration (XML 1.0,
section 2.8) or a text declaration (XML 1.0, section 4.3.1)
using this method.</p>
@param target The processing instruction target.
@param data The processing instruction data, or null if
none was supplied.
@throws org.xml.sax.SAXException Any SAX exception, possibly
wrapping another exception.
@throws org.xml.sax.SAXException
| ToTextStream::processingInstruction | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToTextStream.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToTextStream.java | Apache-2.0 |
public void comment(String data) throws org.xml.sax.SAXException
{
final int length = data.length();
if (length > m_charsBuff.length)
{
m_charsBuff = new char[length*2 + 1];
}
data.getChars(0, length, m_charsBuff, 0);
comment(m_charsBuff, 0, length);
} |
Called when a Comment is to be constructed.
Note that Xalan will normally invoke the other version of this method.
%REVIEW% In fact, is this one ever needed, or was it a mistake?
@param data The comment data.
@throws org.xml.sax.SAXException Any SAX exception, possibly
wrapping another exception.
| ToTextStream::comment | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToTextStream.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToTextStream.java | Apache-2.0 |
public void comment(char ch[], int start, int length)
throws org.xml.sax.SAXException
{
flushPending();
if (m_tracer != null)
super.fireCommentEvent(ch, start, length);
} |
Report an XML comment anywhere in the document.
This callback will be used for comments inside or outside the
document element, including comments in the external DTD
subset (if read).
@param ch An array holding the characters in the comment.
@param start The starting position in the array.
@param length The number of characters to use from the array.
@throws org.xml.sax.SAXException The application may raise an exception.
| ToTextStream::comment | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToTextStream.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToTextStream.java | Apache-2.0 |
public void entityReference(String name) throws org.xml.sax.SAXException
{
if (m_tracer != null)
super.fireEntityReference(name);
} |
Receive notivication of a entityReference.
@param name non-null reference to the name of the entity.
@throws org.xml.sax.SAXException
| ToTextStream::entityReference | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToTextStream.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToTextStream.java | Apache-2.0 |
private void setBufferSize(int size)
{
buf = new byte[size + 3];
buf_length = size;
count = 0;
} |
Creates or replaces the internal buffer, and makes sure it has a few
extra bytes slight overflow of the last UTF8 encoded character.
@param size
| SerializerTraceWriter::setBufferSize | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerTraceWriter.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerTraceWriter.java | Apache-2.0 |
public SerializerTraceWriter(Writer out, SerializerTrace tracer)
{
m_writer = out;
m_tracer = tracer;
setBufferSize(1024);
} |
Constructor.
If the writer passed in is null, then this SerializerTraceWriter will
only signal trace events of what would have been written to that writer.
If the writer passed in is not null then the trace events will mirror
what is going to that writer. In this way tools, such as a debugger, can
gather information on what is being written out.
@param out the Writer to write to (possibly null)
@param tracer the tracer to inform that characters are being written
| SerializerTraceWriter::SerializerTraceWriter | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerTraceWriter.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerTraceWriter.java | Apache-2.0 |
private void flushBuffer() throws IOException
{
// Just for tracing purposes
if (count > 0)
{
char[] chars = new char[count];
for(int i=0; i<count; i++)
chars[i] = (char) buf[i];
if (m_tracer != null)
m_tracer.fireGenerateEvent(
SerializerTrace.EVENTTYPE_OUTPUT_CHARACTERS,
chars,
0,
chars.length);
count = 0;
}
} |
Flush out the collected characters by sending them to the trace
listener. These characters are never written to the real writer
(m_writer) because that has already happened with every method
call. This method simple informs the listener of what has already
happened.
@throws IOException
| SerializerTraceWriter::flushBuffer | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerTraceWriter.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerTraceWriter.java | Apache-2.0 |
public void flush() throws java.io.IOException
{
// send to the real writer
if (m_writer != null)
m_writer.flush();
// from here on just for tracing purposes
flushBuffer();
} |
Flush the internal buffer and flush the Writer
@see java.io.Writer#flush()
| SerializerTraceWriter::flush | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerTraceWriter.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerTraceWriter.java | Apache-2.0 |
public void close() throws java.io.IOException
{
// send to the real writer
if (m_writer != null)
m_writer.close();
// from here on just for tracing purposes
flushBuffer();
} |
Flush the internal buffer and close the Writer
@see java.io.Writer#close()
| SerializerTraceWriter::close | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerTraceWriter.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerTraceWriter.java | Apache-2.0 |
public OutputStream getOutputStream()
{
OutputStream retval = null;
if (m_writer instanceof WriterChain)
retval = ((WriterChain) m_writer).getOutputStream();
return retval;
} |
Get the OutputStream that is the at the end of the
chain of writers.
| SerializerTraceWriter::getOutputStream | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerTraceWriter.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerTraceWriter.java | Apache-2.0 |
protected void fireEndElem(String name)
throws org.xml.sax.SAXException
{
if (m_tracer != null)
{
flushMyWriter();
m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_ENDELEMENT,name, (Attributes)null);
}
} |
To fire off the end element trace event
@param name Name of element
| SerializerBase::fireEndElem | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
protected void fireCharEvent(char[] chars, int start, int length)
throws org.xml.sax.SAXException
{
if (m_tracer != null)
{
flushMyWriter();
m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_CHARACTERS, chars, start,length);
}
} |
Report the characters trace event
@param chars content of characters
@param start starting index of characters to output
@param length number of characters to output
| SerializerBase::fireCharEvent | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
protected String patchName(String qname)
{
final int lastColon = qname.lastIndexOf(':');
if (lastColon > 0) {
final int firstColon = qname.indexOf(':');
final String prefix = qname.substring(0, firstColon);
final String localName = qname.substring(lastColon + 1);
// If uri is "" then ignore prefix
final String uri = m_prefixMap.lookupNamespace(prefix);
if (uri != null && uri.length() == 0) {
return localName;
}
else if (firstColon != lastColon) {
return prefix + ':' + localName;
}
}
return qname;
} |
If at runtime, when the qname of the attribute is
known, another prefix is specified for the attribute, then we can
patch or hack the name with this method. For
a qname of the form "ns?:otherprefix:name", this function patches the
qname by simply ignoring "otherprefix".
TODO: This method is a HACK! We do not have access to the
XML file, it sometimes generates a NS prefix of the form "ns?" for
an attribute.
| SerializerBase::patchName | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
protected static String getLocalName(String qname)
{
final int col = qname.lastIndexOf(':');
return (col > 0) ? qname.substring(col + 1) : qname;
} |
Returns the local name of a qualified name. If the name has no prefix,
then it works as the identity (SAX2).
@param qname the qualified name
@return the name, but excluding any prefix and colon.
| SerializerBase::getLocalName | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void setDocumentLocator(Locator locator)
{
return;
// I don't do anything with this yet.
} |
Receive an object for locating the origin of SAX document events.
@param locator An object that can return the location of any SAX document
event.
Receive an object for locating the origin of SAX document events.
<p>SAX parsers are strongly encouraged (though not absolutely
required) to supply a locator: if it does so, it must supply
the locator to the application by invoking this method before
invoking any of the other methods in the DocumentHandler
interface.</p>
<p>The locator allows the application to determine the end
position of any document-related event, even if the parser is
not reporting an error. Typically, the application will
use this information for reporting its own errors (such as
character content that does not match an application's
business rules). The information returned by the locator
is probably not sufficient for use with a search engine.</p>
<p>Note that the locator will return correct information only
during the invocation of the events in this interface. The
application should not attempt to use it at any other time.</p>
| SerializerBase::setDocumentLocator | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void addAttribute(
String uri,
String localName,
String rawName,
String type,
String value,
boolean XSLAttribute)
throws SAXException
{
if (m_elemContext.m_startTagOpen)
{
addAttributeAlways(uri, localName, rawName, type, value, XSLAttribute);
}
} |
Adds the given attribute to the set of collected attributes , but only if
there is a currently open element.
An element is currently open if a startElement() notification has
occured but the start of the element has not yet been written to the
output. In the stream case this means that we have not yet been forced
to close the elements opening tag by another notification, such as a
character notification.
@param uri the URI of the attribute
@param localName the local name of the attribute
@param rawName the qualified name of the attribute
@param type the type of the attribute (probably CDATA)
@param value the value of the attribute
@param XSLAttribute true if this attribute is coming from an xsl:attriute element
@see ExtendedContentHandler#addAttribute(String, String, String, String, String)
| SerializerBase::addAttribute | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public boolean addAttributeAlways(
String uri,
String localName,
String rawName,
String type,
String value,
boolean XSLAttribute)
{
boolean was_added;
// final int index =
// (localName == null || uri == null) ?
// m_attributes.getIndex(rawName):m_attributes.getIndex(uri, localName);
int index;
// if (localName == null || uri == null){
// index = m_attributes.getIndex(rawName);
// }
// else {
// index = m_attributes.getIndex(uri, localName);
// }
if (localName == null || uri == null || uri.length() == 0)
index = m_attributes.getIndex(rawName);
else {
index = m_attributes.getIndex(uri,localName);
}
if (index >= 0)
{
/* We've seen the attribute before.
* We may have a null uri or localName, but all
* we really want to re-set is the value anyway.
*/
m_attributes.setValue(index,value);
was_added = false;
}
else
{
// the attribute doesn't exist yet, create it
m_attributes.addAttribute(uri, localName, rawName, type, value);
was_added = true;
}
return was_added;
} |
Adds the given attribute to the set of attributes, even if there is
no currently open element. This is useful if a SAX startPrefixMapping()
should need to add an attribute before the element name is seen.
@param uri the URI of the attribute
@param localName the local name of the attribute
@param rawName the qualified name of the attribute
@param type the type of the attribute (probably CDATA)
@param value the value of the attribute
@param XSLAttribute true if this attribute is coming from an xsl:attribute element
@return true if the attribute was added,
false if an existing value was replaced.
| SerializerBase::addAttributeAlways | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void addAttribute(String name, final String value)
{
if (m_elemContext.m_startTagOpen)
{
final String patchedName = patchName(name);
final String localName = getLocalName(patchedName);
final String uri = getNamespaceURI(patchedName, false);
addAttributeAlways(uri,localName, patchedName, "CDATA", value, false);
}
} |
Adds the given attribute to the set of collected attributes,
but only if there is a currently open element.
@param name the attribute's qualified name
@param value the value of the attribute
| SerializerBase::addAttribute | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void addXSLAttribute(String name, final String value, final String uri)
{
if (m_elemContext.m_startTagOpen)
{
final String patchedName = patchName(name);
final String localName = getLocalName(patchedName);
addAttributeAlways(uri,localName, patchedName, "CDATA", value, true);
}
} |
Adds the given xsl:attribute to the set of collected attributes,
but only if there is a currently open element.
@param name the attribute's qualified name (prefix:localName)
@param value the value of the attribute
@param uri the URI that the prefix of the name points to
| SerializerBase::addXSLAttribute | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void addAttributes(Attributes atts) throws SAXException
{
int nAtts = atts.getLength();
for (int i = 0; i < nAtts; i++)
{
String uri = atts.getURI(i);
if (null == uri)
uri = "";
addAttributeAlways(
uri,
atts.getLocalName(i),
atts.getQName(i),
atts.getType(i),
atts.getValue(i),
false);
}
} |
Add the given attributes to the currently collected ones. These
attributes are always added, regardless of whether on not an element
is currently open.
@param atts List of attributes to add to this list
| SerializerBase::addAttributes | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public ContentHandler asContentHandler() throws IOException
{
return this;
} |
Return a {@link ContentHandler} interface into this serializer.
If the serializer does not support the {@link ContentHandler}
interface, it should return null.
@return A {@link ContentHandler} interface into this serializer,
or null if the serializer is not SAX 2 capable
@throws IOException An I/O exception occured
| SerializerBase::asContentHandler | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void endEntity(String name) throws org.xml.sax.SAXException
{
if (name.equals("[dtd]"))
m_inExternalDTD = false;
m_inEntityRef = false;
if (m_tracer != null)
this.fireEndEntity(name);
} |
Report the end of an entity.
@param name The name of the entity that is ending.
@throws org.xml.sax.SAXException The application may raise an exception.
@see #startEntity
| SerializerBase::endEntity | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void close()
{
// do nothing (base behavior)
} |
Flush and close the underlying java.io.Writer. This method applies to
ToStream serializers, not ToSAXHandler serializers.
@see ToStream
| SerializerBase::close | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
protected void initCDATA()
{
// CDATA stack
// _cdataStack = new Stack();
// _cdataStack.push(new Integer(-1)); // push dummy value
} |
Initialize global variables
| SerializerBase::initCDATA | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public String getEncoding()
{
return getOutputProperty(OutputKeys.ENCODING);
} |
Returns the character encoding to be used in the output document.
@return the character encoding to be used in the output document.
| SerializerBase::getEncoding | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void setEncoding(String encoding)
{
setOutputProperty(OutputKeys.ENCODING,encoding);
} |
Sets the character encoding coming from the xsl:output encoding stylesheet attribute.
@param m_encoding the character encoding
| SerializerBase::setEncoding | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void setOmitXMLDeclaration(boolean b)
{
String val = b ? "yes":"no";
setOutputProperty(OutputKeys.OMIT_XML_DECLARATION,val);
} |
Sets the value coming from the xsl:output omit-xml-declaration stylesheet attribute
@param b true if the XML declaration is to be omitted from the output
document.
| SerializerBase::setOmitXMLDeclaration | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public boolean getOmitXMLDeclaration()
{
return m_shouldNotWriteXMLHeader;
} |
@return true if the XML declaration is to be omitted from the output
document.
| SerializerBase::getOmitXMLDeclaration | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public String getDoctypePublic()
{
return m_doctypePublic;
} |
Returns the previously set value of the value to be used as the public
identifier in the document type declaration (DTD).
@return the public identifier to be used in the DOCTYPE declaration in the
output document.
| SerializerBase::getDoctypePublic | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void setDoctypePublic(String doctypePublic)
{
setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, doctypePublic);
} | Set the value coming from the xsl:output doctype-public stylesheet attribute.
@param doctypePublic the public identifier to be used in the DOCTYPE
declaration in the output document.
| SerializerBase::setDoctypePublic | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public String getDoctypeSystem()
{
return m_doctypeSystem;
} |
Returns the previously set value of the value to be used
as the system identifier in the document type declaration (DTD).
@return the system identifier to be used in the DOCTYPE declaration in
the output document.
| SerializerBase::getDoctypeSystem | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void setDoctypeSystem(String doctypeSystem)
{
setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, doctypeSystem);
} | Set the value coming from the xsl:output doctype-system stylesheet attribute.
@param doctypeSystem the system identifier to be used in the DOCTYPE
declaration in the output document.
| SerializerBase::setDoctypeSystem | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void setDoctype(String doctypeSystem, String doctypePublic)
{
setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, doctypeSystem);
setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, doctypePublic);
} | Set the value coming from the xsl:output doctype-public and doctype-system stylesheet properties
@param doctypeSystem the system identifier to be used in the DOCTYPE
declaration in the output document.
@param doctypePublic the public identifier to be used in the DOCTYPE
declaration in the output document.
| SerializerBase::setDoctype | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void setStandalone(String standalone)
{
setOutputProperty(OutputKeys.STANDALONE, standalone);
} |
Sets the value coming from the xsl:output standalone stylesheet attribute.
@param standalone a value of "yes" indicates that the
<code>standalone</code> delaration is to be included in the output
document. This method remembers if the value was explicitly set using
this method, verses if the value is the default value.
| SerializerBase::setStandalone | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
protected void setStandaloneInternal(String standalone)
{
if ("yes".equals(standalone))
m_standalone = "yes";
else
m_standalone = "no";
} |
Sets the XSL standalone attribute, but does not remember if this is a
default or explicite setting.
@param standalone "yes" | "no"
| SerializerBase::setStandaloneInternal | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public String getStandalone()
{
return m_standalone;
} |
Gets the XSL standalone attribute
@return a value of "yes" if the <code>standalone</code> delaration is to
be included in the output document.
@see XSLOutputAttributes#getStandalone()
| SerializerBase::getStandalone | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public boolean getIndent()
{
return m_doIndent;
} |
@return true if the output document should be indented to visually
indicate its structure.
| SerializerBase::getIndent | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public String getMediaType()
{
return m_mediatype;
} |
Gets the mediatype the media-type or MIME type associated with the output
document.
@return the mediatype the media-type or MIME type associated with the
output document.
| SerializerBase::getMediaType | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public String getVersion()
{
return m_version;
} |
Gets the version of the output format.
@return the version of the output format.
| SerializerBase::getVersion | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void setVersion(String version)
{
setOutputProperty(OutputKeys.VERSION, version);
} |
Sets the value coming from the xsl:output version attribute.
@param version the version of the output format.
@see SerializationHandler#setVersion(String)
| SerializerBase::setVersion | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void setMediaType(String mediaType)
{
setOutputProperty(OutputKeys.MEDIA_TYPE,mediaType);
} |
Sets the value coming from the xsl:output media-type stylesheet attribute.
@param mediaType the non-null media-type or MIME type associated with the
output document.
@see javax.xml.transform.OutputKeys#MEDIA_TYPE
@see SerializationHandler#setMediaType(String)
| SerializerBase::setMediaType | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void setIndent(boolean doIndent)
{
String val = doIndent ? "yes":"no";
setOutputProperty(OutputKeys.INDENT,val);
} |
Sets the value coming from the xsl:output indent stylesheet
attribute.
@param doIndent true if the output document should be indented to
visually indicate its structure.
@see XSLOutputAttributes#setIndent(boolean)
| SerializerBase::setIndent | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public DOMSerializer asDOMSerializer() throws IOException
{
return this;
} |
Return a {@link DOMSerializer} interface into this serializer. If the
serializer does not support the {@link DOMSerializer} interface, it should
return null.
@return A {@link DOMSerializer} interface into this serializer, or null
if the serializer is not DOM capable
@throws IOException An I/O exception occured
@see Serializer#asDOMSerializer()
| SerializerBase::asDOMSerializer | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
private static final boolean subPartMatch(String p, String t)
{
return (p == t) || ((null != p) && (p.equals(t)));
} |
Tell if two strings are equal, without worry if the first string is null.
@param p String reference, which may be null.
@param t String reference, which may be null.
@return true if strings are equal.
| SerializerBase::subPartMatch | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
protected static final String getPrefixPart(String qname)
{
final int col = qname.indexOf(':');
return (col > 0) ? qname.substring(0, col) : null;
//return (col > 0) ? qname.substring(0,col) : "";
} |
Returns the local name of a qualified name.
If the name has no prefix,
then it works as the identity (SAX2).
@param qname a qualified name
@return returns the prefix of the qualified name,
or null if there is no prefix.
| SerializerBase::getPrefixPart | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public NamespaceMappings getNamespaceMappings()
{
return m_prefixMap;
} |
Some users of the serializer may need the current namespace mappings
@return the current namespace mappings (prefix/uri)
@see ExtendedContentHandler#getNamespaceMappings()
| SerializerBase::getNamespaceMappings | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public String getPrefix(String namespaceURI)
{
String prefix = m_prefixMap.lookupPrefix(namespaceURI);
return prefix;
} |
Returns the prefix currently pointing to the given URI (if any).
@param namespaceURI the uri of the namespace in question
@return a prefix pointing to the given URI (if any).
@see ExtendedContentHandler#getPrefix(String)
| SerializerBase::getPrefix | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public String getNamespaceURI(String qname, boolean isElement)
{
String uri = EMPTYSTRING;
int col = qname.lastIndexOf(':');
final String prefix = (col > 0) ? qname.substring(0, col) : EMPTYSTRING;
if (!EMPTYSTRING.equals(prefix) || isElement)
{
if (m_prefixMap != null)
{
uri = m_prefixMap.lookupNamespace(prefix);
if (uri == null && !prefix.equals(XMLNS_PREFIX))
{
throw new RuntimeException(
Utils.messages.createMessage(
MsgKey.ER_NAMESPACE_PREFIX,
new Object[] { qname.substring(0, col) } ));
}
}
}
return uri;
} |
Returns the URI of an element or attribute. Note that default namespaces
do not apply directly to attributes.
@param qname a qualified name
@param isElement true if the qualified name is the name of
an element.
@return returns the namespace URI associated with the qualified name.
| SerializerBase::getNamespaceURI | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public String getNamespaceURIFromPrefix(String prefix)
{
String uri = null;
if (m_prefixMap != null)
uri = m_prefixMap.lookupNamespace(prefix);
return uri;
} |
Returns the URI of prefix (if any)
@param prefix the prefix whose URI is searched for
@return the namespace URI currently associated with the
prefix, null if the prefix is undefined.
| SerializerBase::getNamespaceURIFromPrefix | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void entityReference(String name) throws org.xml.sax.SAXException
{
flushPending();
startEntity(name);
endEntity(name);
if (m_tracer != null)
fireEntityReference(name);
} |
Entity reference event.
@param name Name of entity
@throws org.xml.sax.SAXException
| SerializerBase::entityReference | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void setTransformer(Transformer t)
{
m_transformer = t;
// If this transformer object implements the SerializerTrace interface
// then assign m_tracer to the transformer object so it can be used
// to fire trace events.
if ((m_transformer instanceof SerializerTrace) &&
(((SerializerTrace) m_transformer).hasTraceListeners())) {
m_tracer = (SerializerTrace) m_transformer;
} else {
m_tracer = null;
}
} |
Sets the transformer associated with this serializer
@param t the transformer associated with this serializer.
@see SerializationHandler#setTransformer(Transformer)
| SerializerBase::setTransformer | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public Transformer getTransformer()
{
return m_transformer;
} |
Gets the transformer associated with this serializer
@return returns the transformer associated with this serializer.
@see SerializationHandler#getTransformer()
| SerializerBase::getTransformer | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void characters(org.w3c.dom.Node node)
throws org.xml.sax.SAXException
{
flushPending();
String data = node.getNodeValue();
if (data != null)
{
final int length = data.length();
if (length > m_charsBuff.length)
{
m_charsBuff = new char[length * 2 + 1];
}
data.getChars(0, length, m_charsBuff, 0);
characters(m_charsBuff, 0, length);
}
} |
This method gets the nodes value as a String and uses that String as if
it were an input character notification.
@param node the Node to serialize
@throws org.xml.sax.SAXException
| SerializerBase::characters | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
protected void fireStartEntity(String name)
throws org.xml.sax.SAXException
{
if (m_tracer != null)
{
flushMyWriter();
m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_ENTITYREF, name);
}
} |
To fire off start entity trace event
@param name Name of entity
| SerializerBase::fireStartEntity | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
private void flushMyWriter()
{
if (m_writer != null)
{
try
{
m_writer.flush();
}
catch(IOException ioe)
{
}
}
} |
This method is only used internally when flushing the writer from the
various fire...() trace events. Due to the writer being wrapped with
SerializerTraceWriter it may cause the flush of these trace events:
EVENTTYPE_OUTPUT_PSEUDO_CHARACTERS
EVENTTYPE_OUTPUT_CHARACTERS
which trace the output written to the output stream.
| SerializerBase::flushMyWriter | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
protected void fireCDATAEvent(char[] chars, int start, int length)
throws org.xml.sax.SAXException
{
if (m_tracer != null)
{
flushMyWriter();
m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_CDATA, chars, start,length);
}
} |
Report the CDATA trace event
@param chars content of CDATA
@param start starting index of characters to output
@param length number of characters to output
| SerializerBase::fireCDATAEvent | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
protected void fireCommentEvent(char[] chars, int start, int length)
throws org.xml.sax.SAXException
{
if (m_tracer != null)
{
flushMyWriter();
m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_COMMENT, new String(chars, start, length));
}
} |
Report the comment trace event
@param chars content of comment
@param start starting index of comment to output
@param length number of characters to output
| SerializerBase::fireCommentEvent | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void fireEndEntity(String name)
throws org.xml.sax.SAXException
{
if (m_tracer != null)
flushMyWriter();
// we do not need to handle this.
} |
To fire off end entity trace event
@param name Name of entity
| SerializerBase::fireEndEntity | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
protected void fireStartDoc()
throws org.xml.sax.SAXException
{
if (m_tracer != null)
{
flushMyWriter();
m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_STARTDOCUMENT);
}
} |
To fire off start document trace event
| SerializerBase::fireStartDoc | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
protected void fireEndDoc()
throws org.xml.sax.SAXException
{
if (m_tracer != null)
{
flushMyWriter();
m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_ENDDOCUMENT);
}
} |
To fire off end document trace event
| SerializerBase::fireEndDoc | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
protected void fireStartElem(String elemName)
throws org.xml.sax.SAXException
{
if (m_tracer != null)
{
flushMyWriter();
m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_STARTELEMENT,
elemName, m_attributes);
}
} |
Report the start element trace event. This trace method needs to be
called just before the attributes are cleared.
@param elemName the qualified name of the element
| SerializerBase::fireStartElem | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
protected void fireEscapingEvent(String name, String data)
throws org.xml.sax.SAXException
{
if (m_tracer != null)
{
flushMyWriter();
m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_PI,name, data);
}
} |
To fire off the PI trace event
@param name Name of PI
| SerializerBase::fireEscapingEvent | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
protected void fireEntityReference(String name)
throws org.xml.sax.SAXException
{
if (m_tracer != null)
{
flushMyWriter();
m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_ENTITYREF,name, (Attributes)null);
}
} |
To fire off the entity reference trace event
@param name Name of entity reference
| SerializerBase::fireEntityReference | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void startDocument() throws org.xml.sax.SAXException
{
// if we do get called with startDocument(), handle it right away
startDocumentInternal();
m_needToCallStartDocument = false;
return;
} |
Receive notification of the beginning of a document.
This method is never a self generated call,
but only called externally.
<p>The SAX parser will invoke this method only once, before any
other methods in this interface or in DTDHandler (except for
setDocumentLocator).</p>
@throws org.xml.sax.SAXException Any SAX exception, possibly
wrapping another exception.
@throws org.xml.sax.SAXException
| SerializerBase::startDocument | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
protected void startDocumentInternal() throws org.xml.sax.SAXException
{
if (m_tracer != null)
this.fireStartDoc();
} |
This method handles what needs to be done at a startDocument() call,
whether from an external caller, or internally called in the
serializer. For historical reasons the serializer is flexible to
startDocument() not always being called.
Even if no external call is
made into startDocument() this method will always be called as a self
generated internal startDocument, it handles what needs to be done at a
startDocument() call.
This method exists just to make sure that startDocument() is only ever
called from an external caller, which in principle is just a matter of
style.
@throws SAXException
| SerializerBase::startDocumentInternal | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void setNamespaceMappings(NamespaceMappings mappings) {
m_prefixMap = mappings;
} |
Used only by TransformerSnapshotImpl to restore the serialization
to a previous state.
@param mappings NamespaceMappings
| SerializerBase::setNamespaceMappings | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
private void resetSerializerBase()
{
this.m_attributes.clear();
this.m_CdataElems = null;
this.m_cdataTagOpen = false;
this.m_docIsEmpty = true;
this.m_doctypePublic = null;
this.m_doctypeSystem = null;
this.m_doIndent = false;
this.m_elemContext = new ElemContext();
this.m_indentAmount = 0;
this.m_inEntityRef = false;
this.m_inExternalDTD = false;
this.m_mediatype = null;
this.m_needToCallStartDocument = true;
this.m_needToOutputDocTypeDecl = false;
if (m_OutputProps != null)
this.m_OutputProps.clear();
if (m_OutputPropsDefault != null)
this.m_OutputPropsDefault.clear();
if (this.m_prefixMap != null)
this.m_prefixMap.reset();
this.m_shouldNotWriteXMLHeader = false;
this.m_sourceLocator = null;
this.m_standalone = null;
this.m_standaloneWasSpecified = false;
this.m_StringOfCDATASections = null;
this.m_tracer = null;
this.m_transformer = null;
this.m_version = null;
// don't set writer to null, so that it might be re-used
//this.m_writer = null;
} |
Reset all of the fields owned by SerializerBase
| SerializerBase::resetSerializerBase | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
final boolean inTemporaryOutputState()
{
/* This is a hack. We should really be letting the serializer know
* that it is in temporary output state with an explicit call, but
* from a pragmatic point of view (for now anyways) having no output
* encoding at all, not even the default UTF-8 indicates that the serializer
* is being used for temporary RTF.
*/
return (getEncoding() == null);
} |
Returns true if the serializer is used for temporary output rather than
final output.
This concept is made clear in the XSLT 2.0 draft.
| SerializerBase::inTemporaryOutputState | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void addAttribute(String uri, String localName, String rawName, String type, String value) throws SAXException
{
if (m_elemContext.m_startTagOpen)
{
addAttributeAlways(uri, localName, rawName, type, value, false);
}
} |
This method adds an attribute the the current element,
but should not be used for an xsl:attribute child.
@see ExtendedContentHandler#addAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
| SerializerBase::addAttribute | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void notationDecl(String arg0, String arg1, String arg2)
throws SAXException {
// This method just provides a definition to satisfy the interface
// A particular sub-class of SerializerBase provides the implementation (if desired)
} |
@see org.xml.sax.DTDHandler#notationDecl(java.lang.String, java.lang.String, java.lang.String)
| SerializerBase::notationDecl | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void unparsedEntityDecl(
String arg0,
String arg1,
String arg2,
String arg3)
throws SAXException {
// This method just provides a definition to satisfy the interface
// A particular sub-class of SerializerBase provides the implementation (if desired)
} |
@see org.xml.sax.DTDHandler#unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
| SerializerBase::unparsedEntityDecl | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void setDTDEntityExpansion(boolean expand) {
// This method just provides a definition to satisfy the interface
// A particular sub-class of SerializerBase provides the implementation (if desired)
} |
If set to false the serializer does not expand DTD entities,
but leaves them as is, the default value is true.
| SerializerBase::setDTDEntityExpansion | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public boolean documentIsEmpty() {
// If we haven't called startDocument() yet, then this document is empty
return m_docIsEmpty && (m_elemContext.m_currentElemDepth == 0);
} |
Return true if nothing has been sent to this result tree yet.
<p>
This is not a public API.
@xsl.usage internal
| SerializerBase::documentIsEmpty | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
protected boolean isCdataSection()
{
boolean b = false;
if (null != m_StringOfCDATASections)
{
if (m_elemContext.m_elementLocalName == null)
{
String localName = getLocalName(m_elemContext.m_elementName);
m_elemContext.m_elementLocalName = localName;
}
if ( m_elemContext.m_elementURI == null) {
m_elemContext.m_elementURI = getElementURI();
}
else if ( m_elemContext.m_elementURI.length() == 0) {
if ( m_elemContext.m_elementName == null) {
m_elemContext.m_elementName = m_elemContext.m_elementLocalName;
// leave URI as "", meaning in no namespace
}
else if (m_elemContext.m_elementLocalName.length() < m_elemContext.m_elementName.length()){
// We were told the URI was "", yet the name has a prefix since the name is longer than the localname.
// So we will fix that incorrect information here.
m_elemContext.m_elementURI = getElementURI();
}
}
java.util.Hashtable h = (java.util.Hashtable) m_CdataElems.get(m_elemContext.m_elementLocalName);
if (h != null)
{
Object obj = h.get(m_elemContext.m_elementURI);
if (obj != null)
b = true;
}
}
return b;
} |
Return true if the current element in m_elemContext
is a CDATA section.
CDATA sections are specified in the <xsl:output> attribute
cdata-section-names or in the JAXP equivalent property.
In any case the format of the value of such a property is:
<pre>
"{uri1}localName1 {uri2}localName2 . . . "
</pre>
<p>
This method is not a public API, but is only used internally by the serializer.
| SerializerBase::isCdataSection | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
private String getElementURI() {
String uri = null;
// At this point in processing we have received all the
// namespace mappings
// As we still don't know the elements namespace,
// we now figure it out.
String prefix = getPrefixPart(m_elemContext.m_elementName);
if (prefix == null) {
// no prefix so lookup the URI of the default namespace
uri = m_prefixMap.lookupNamespace("");
} else {
uri = m_prefixMap.lookupNamespace(prefix);
}
if (uri == null) {
// We didn't find the namespace for the
// prefix ... ouch, that shouldn't happen.
// This is a hack, we really don't know
// the namespace
uri = EMPTYSTRING;
}
return uri;
} |
Before this call m_elementContext.m_elementURI is null,
which means it is not yet known. After this call it
is non-null, but possibly "" meaning that it is in the
default namespace.
@return The URI of the element, never null, but possibly "".
| SerializerBase::getElementURI | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public String getOutputProperty(String name) {
String val = getOutputPropertyNonDefault(name);
// If no explicit value, try to get the default value
if (val == null)
val = getOutputPropertyDefault(name);
return val;
} |
Get the value of an output property,
the explicit value, if any, otherwise the
default value, if any, otherwise null.
| SerializerBase::getOutputProperty | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public String getOutputPropertyNonDefault(String name )
{
return getProp(name,false);
} |
Get the value of an output property,
not the default value. If there is a default
value, but no non-default value this method
will return null.
<p>
| SerializerBase::getOutputPropertyNonDefault | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public Object asDOM3Serializer() throws IOException
{
return new org.apache.xml.serializer.dom3.DOM3SerializerImpl(this);
} |
Return a {@link DOM3Serializer} interface into this serializer. If the
serializer does not support the {@link DOM3Serializer} interface, it should
return null.
@return A {@link DOM3Serializer} interface into this serializer, or null
if the serializer is not DOM capable
@throws IOException An I/O exception occured
@see org.apache.xml.serializer.Serializer#asDOM3Serializer()
| SerializerBase::asDOM3Serializer | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public String getOutputPropertyDefault(String name) {
return getProp(name, true);
} |
Get the default value of an xsl:output property,
which would be null only if no default value exists
for the property.
| SerializerBase::getOutputPropertyDefault | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void setOutputProperty(String name, String val) {
setProp(name,val,false);
} |
Set the value for the output property, typically from
an xsl:output element, but this does not change what
the default value is.
| SerializerBase::setOutputProperty | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public void setOutputPropertyDefault(String name, String val) {
setProp(name,val,true);
} |
Set the default value for an output property, but this does
not impact any explicitly set value.
| SerializerBase::setOutputPropertyDefault | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
void setProp(String name, String val, boolean defaultVal) {
if (m_OutputProps == null) {
m_OutputProps = new HashMap();
m_OutputPropsDefault = new HashMap();
}
if (defaultVal)
m_OutputPropsDefault.put(name,val);
else {
if (OutputKeys.CDATA_SECTION_ELEMENTS.equals(name) && val != null) {
initCdataElems(val);
String oldVal = (String) m_OutputProps.get(name);
String newVal;
if (oldVal == null)
newVal = oldVal + ' ' + val;
else
newVal = val;
m_OutputProps.put(name,newVal);
}
else {
m_OutputProps.put(name,val);
}
}
} |
@param name The name of the property, e.g. "{http://myprop}indent-tabs" or "indent".
@param val The value of the property, e.g. "4"
@param defaultVal true if this is a default value being set for the property as
opposed to a user define on, set say explicitly in the stylesheet or via JAXP
| SerializerBase::setProp | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
static char getFirstCharLocName(String name) {
final char first;
int i = name.indexOf('}');
if (i < 0)
first = name.charAt(0);
else
first = name.charAt(i+1);
return first;
} |
Get the first char of the local name
@param name Either a local name, or a local name
preceeded by a uri enclosed in curly braces.
| SerializerBase::getFirstCharLocName | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | Apache-2.0 |
public static boolean getBooleanProperty(String key, Properties props)
{
String s = props.getProperty(key);
if (null == s || !s.equals("yes"))
return false;
else
return true;
} |
Searches for the boolean property with the specified key in the property list.
If the key is not found in this property list, the default property list,
and its defaults, recursively, are then checked. The method returns
<code>false</code> if the property is not found, or if the value is other
than "yes".
@param key the property key.
@param props the list of properties that will be searched.
@return the value in this property list as a boolean value, or false
if null or not "yes".
| OutputPropertyUtils::getBooleanProperty | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/OutputPropertyUtils.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/OutputPropertyUtils.java | Apache-2.0 |
public static int getIntProperty(String key, Properties props)
{
String s = props.getProperty(key);
if (null == s)
return 0;
else
return Integer.parseInt(s);
} |
Searches for the int property with the specified key in the property list.
If the key is not found in this property list, the default property list,
and its defaults, recursively, are then checked. The method returns
<code>false</code> if the property is not found, or if the value is other
than "yes".
@param key the property key.
@param props the list of properties that will be searched.
@return the value in this property list as a int value, or 0
if null or not a number.
| OutputPropertyUtils::getIntProperty | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/OutputPropertyUtils.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/OutputPropertyUtils.java | Apache-2.0 |
public static String getProduct()
{
return "Serializer";
} |
Name of product: Serializer.
| Version::getProduct | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/Version.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/Version.java | Apache-2.0 |
ElemContext()
{
// this assignment means can never pop this context off
m_prev = this;
// depth 0 because it doesn't correspond to any element
m_currentElemDepth = 0;
} |
Constructor to create the root of the element contexts.
| ElemContext::ElemContext | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemContext.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemContext.java | Apache-2.0 |
private ElemContext(final ElemContext previous)
{
m_prev = previous;
m_currentElemDepth = previous.m_currentElemDepth + 1;
} |
Constructor to create the "stack frame" for a given element depth.
This implementation will re-use the context at each depth. If
a documents deepest element depth is N then there will be (N+1)
such objects created, no more than that.
@param previous The "stack frame" corresponding to the new
elements parent element.
| ElemContext::ElemContext | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemContext.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemContext.java | Apache-2.0 |
final ElemContext pop()
{
/* a very simple pop. No clean up is done of the deeper
* stack frame. All deeper stack frames are still attached
* but dormant, just waiting to be re-used.
*/
return this.m_prev;
} |
Pop the current "stack frame".
@return Returns the parent "stack frame" of the one popped.
| ElemContext::pop | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemContext.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemContext.java | Apache-2.0 |
final ElemContext push()
{
ElemContext frame = this.m_next;
if (frame == null)
{
/* We have never been at this depth yet, and there is no
* stack frame to re-use, so we now make a new one.
*/
frame = new ElemContext(this);
this.m_next = frame;
}
/*
* We shouldn't need to set this true because we should just
* be pushing a dummy stack frame that will be instantly popped.
* Yet we need to be ready in case this element does have
* unexpected children.
*/
frame.m_startTagOpen = true;
return frame;
} |
This method pushes an element "stack frame"
but with no initialization of values in that frame.
This method is used for optimization purposes, like when pushing
a stack frame for an HTML "IMG" tag which has no children and
the stack frame will almost immediately be popped.
| ElemContext::push | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemContext.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemContext.java | Apache-2.0 |
final ElemContext push(
final String uri,
final String localName,
final String qName)
{
ElemContext frame = this.m_next;
if (frame == null)
{
/* We have never been at this depth yet, and there is no
* stack frame to re-use, so we now make a new one.
*/
frame = new ElemContext(this);
this.m_next = frame;
}
// Initialize, or reset values in the new or re-used stack frame.
frame.m_elementName = qName;
frame.m_elementLocalName = localName;
frame.m_elementURI = uri;
frame.m_isCdataSection = false;
frame.m_startTagOpen = true;
// is_Raw is already set in the HTML startElement() method
// frame.m_isRaw = false;
return frame;
} |
Push an element context on the stack. This context keeps track of
information gathered about the element.
@param uri The URI for the namespace for the element name,
can be null if it is not yet known.
@param localName The local name of the element (no prefix),
can be null.
@param qName The qualified name (with prefix, if any)
of the element, this parameter is required.
| ElemContext::push | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemContext.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemContext.java | Apache-2.0 |
ElemDesc(int flags)
{
m_flags = flags;
} |
Construct an ElemDesc from a set of bit flags.
@param flags Bit flags that describe the basic properties of this element type.
| ElemDesc::ElemDesc | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemDesc.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemDesc.java | Apache-2.0 |
private boolean is(int flags)
{
// int which = (m_flags & flags);
return (m_flags & flags) != 0;
} |
Tell if this element type has the basic bit properties that are passed
as an argument.
@param flags Bit flags that describe the basic properties of interest.
@return true if any of the flag bits are true.
| ElemDesc::is | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemDesc.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemDesc.java | Apache-2.0 |
void setAttr(String name, int flags)
{
if (null == m_attrs)
m_attrs = new StringToIntTable();
m_attrs.put(name, flags);
} |
Set an attribute name and it's bit properties.
@param name non-null name of attribute, in upper case.
@param flags flag bits.
| ElemDesc::setAttr | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemDesc.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemDesc.java | Apache-2.0 |
public boolean isAttrFlagSet(String name, int flags)
{
return (null != m_attrs)
? ((m_attrs.getIgnoreCase(name) & flags) != 0)
: false;
} |
Tell if any of the bits of interest are set for a named attribute type.
@param name non-null reference to attribute name, in any case.
@param flags flag mask.
@return true if any of the flags are set for the named attribute.
| ElemDesc::isAttrFlagSet | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemDesc.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemDesc.java | Apache-2.0 |
public void endDocument() throws SAXException
{
flushPending();
// Close output document
m_saxHandler.endDocument();
if (m_tracer != null)
super.fireEndDoc();
} |
Receives notification of the end of the document.
@see org.xml.sax.ContentHandler#endDocument()
| ToXMLSAXHandler::endDocument | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToXMLSAXHandler.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToXMLSAXHandler.java | Apache-2.0 |
protected void closeStartTag() throws SAXException
{
m_elemContext.m_startTagOpen = false;
final String localName = getLocalName(m_elemContext.m_elementName);
final String uri = getNamespaceURI(m_elemContext.m_elementName, true);
// Now is time to send the startElement event
if (m_needToCallStartDocument)
{
startDocumentInternal();
}
m_saxHandler.startElement(uri, localName, m_elemContext.m_elementName, m_attributes);
// we've sent the official SAX attributes on their way,
// now we don't need them anymore.
m_attributes.clear();
if(m_state != null)
m_state.setCurrentNode(null);
} |
This method is called when all the data needed for a call to the
SAX handler's startElement() method has been gathered.
| ToXMLSAXHandler::closeStartTag | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToXMLSAXHandler.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToXMLSAXHandler.java | Apache-2.0 |
public void closeCDATA() throws SAXException
{
// Output closing bracket - "]]>"
if (m_lexHandler != null && m_cdataTagOpen) {
m_lexHandler.endCDATA();
}
// There are no longer any calls made to
// m_lexHandler.startCDATA() without a balancing call to
// m_lexHandler.endCDATA()
// so we set m_cdataTagOpen to false to remember this.
m_cdataTagOpen = false;
} |
Closes ane open cdata tag, and
unlike the this.endCDATA() method (from the LexicalHandler) interface,
this "internal" method will send the endCDATA() call to the wrapped
handler.
| ToXMLSAXHandler::closeCDATA | java | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToXMLSAXHandler.java | https://github.com/google/j2objc/blob/master/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToXMLSAXHandler.java | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.