Methods Summary |
---|
public void | any(org.apache.xerces.xni.Augmentations augs)Any.
printIndent();
fOut.print("any(");
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | attributeDecl(java.lang.String elementName, java.lang.String attributeName, java.lang.String type, java.lang.String[] enumeration, java.lang.String defaultType, org.apache.xerces.xni.XMLString defaultValue, org.apache.xerces.xni.XMLString nonNormalizedDefaultValue, org.apache.xerces.xni.Augmentations augs)Attribute declaration.
printIndent();
fOut.print("attributeDecl(");
fOut.print("elementName=");
printQuotedString(elementName);
fOut.print(',");
fOut.print("attributeName=");
printQuotedString(attributeName);
fOut.print(',");
fOut.print("type=");
printQuotedString(type);
fOut.print(',");
fOut.print("enumeration=");
if (enumeration == null) {
fOut.print("null");
}
else {
fOut.print('{");
for (int i = 0; i < enumeration.length; i++) {
printQuotedString(enumeration[i]);
if (i < enumeration.length - 1) {
fOut.print(',");
}
}
fOut.print('}");
}
fOut.print(',");
fOut.print("defaultType=");
printQuotedString(defaultType);
fOut.print(',");
fOut.print("defaultValue=");
if (defaultValue == null) {
fOut.print("null");
}
else {
printQuotedString(defaultValue.ch, defaultValue.offset,
defaultValue.length);
}
fOut.print(',");
fOut.print("nonNormalizedDefaultValue=");
if (nonNormalizedDefaultValue == null) {
fOut.print("null");
}
else {
printQuotedString(nonNormalizedDefaultValue.ch, nonNormalizedDefaultValue.offset,
nonNormalizedDefaultValue.length);
}
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | characters(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs)
printIndent();
fOut.print("characters(");
fOut.print("text=");
printQuotedString(text.ch, text.offset, text.length);
/***
if (augs != null) {
ElementPSVI element = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI);
fOut.print(",schemaNormalized=");
printQuotedString(element.getSchemaNormalizedValue());
}
/***/
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | comment(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs)Comment.
printIndent();
fOut.print("comment(");
fOut.print("text=");
printQuotedString(text.ch, text.offset, text.length);
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | doctypeDecl(java.lang.String rootElement, java.lang.String publicId, java.lang.String systemId, org.apache.xerces.xni.Augmentations augs)Doctype declaration.
printIndent();
fOut.print("doctypeDecl(");
fOut.print("rootElement=");
printQuotedString(rootElement);
fOut.print(',");
fOut.print("publicId=");
printQuotedString(publicId);
fOut.print(',");
fOut.print("systemId=");
printQuotedString(systemId);
fOut.println(')");
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.flush();
|
public void | element(java.lang.String elementName, org.apache.xerces.xni.Augmentations augs)Element.
printIndent();
fOut.print("element(");
fOut.print("elementName=");
printQuotedString(elementName);
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | elementDecl(java.lang.String name, java.lang.String contentModel, org.apache.xerces.xni.Augmentations augs)Element declaration.
printIndent();
fOut.print("elementDecl(");
fOut.print("name=");
printQuotedString(name);
fOut.print(',");
fOut.print("contentModel=");
printQuotedString(contentModel);
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | empty(org.apache.xerces.xni.Augmentations augs)Empty.
printIndent();
fOut.print("empty(");
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | emptyElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.Augmentations augs)Empty element.
printInScopeNamespaces();
printIndent();
fOut.print("emptyElement(");
printElement(element, attributes);
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
printEndNamespaceMapping();
|
public void | endAttlist(org.apache.xerces.xni.Augmentations augs)End attribute list.
fIndent--;
printIndent();
fOut.print("endAttlist(");
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | endCDATA(org.apache.xerces.xni.Augmentations augs)End CDATA section.
fIndent--;
printIndent();
fOut.print("endCDATA(");
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | endConditional(org.apache.xerces.xni.Augmentations augs)End conditional section.
fIndent--;
printIndent();
fOut.print("endConditional(");
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | endContentModel(org.apache.xerces.xni.Augmentations augs)End content model.
fIndent--;
printIndent();
fOut.print("endContentModel(");
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | endDTD(org.apache.xerces.xni.Augmentations augs)End DTD.
fIndent--;
printIndent();
fOut.print("endDTD(");
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | endDocument(org.apache.xerces.xni.Augmentations augs)End document.
fIndent--;
printIndent();
fOut.print("endDocument(");
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | endElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.Augmentations augs)End element.
fIndent--;
printIndent();
fOut.print("endElement(");
fOut.print("element=");
fOut.print('{");
fOut.print("prefix=");
printQuotedString(element.prefix);
fOut.print(',");
fOut.print("localpart=");
printQuotedString(element.localpart);
fOut.print(',");
fOut.print("rawname=");
printQuotedString(element.rawname);
fOut.print(',");
fOut.print("uri=");
printQuotedString(element.uri);
fOut.print('}");
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
printEndNamespaceMapping();
|
public void | endExternalSubset(org.apache.xerces.xni.Augmentations augs)End external subset.
fIndent--;
printIndent();
fOut.print("endExternalSubset(");
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | endGeneralEntity(java.lang.String name, org.apache.xerces.xni.Augmentations augs)End entity.
fIndent--;
printIndent();
fOut.print("endGeneralEntity(");
fOut.print("name=");
printQuotedString(name);
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | endGroup(org.apache.xerces.xni.Augmentations augs)End group.
fIndent--;
printIndent();
fOut.print("endGroup(");
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | endParameterEntity(java.lang.String name, org.apache.xerces.xni.Augmentations augs)End entity.
fIndent--;
printIndent();
fOut.print("endParameterEntity(");
fOut.print("name=");
printQuotedString(name);
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | error(java.lang.String domain, java.lang.String key, org.apache.xerces.xni.parser.XMLParseException ex)Error.
printError("Error", ex);
|
public void | externalEntityDecl(java.lang.String name, org.apache.xerces.xni.XMLResourceIdentifier identifier, org.apache.xerces.xni.Augmentations augs)External entity declaration.
printIndent();
fOut.print("externalEntityDecl(");
fOut.print("name=");
printQuotedString(name);
fOut.print(',");
fOut.print("publicId=");
printQuotedString(identifier.getPublicId());
fOut.print(',");
fOut.print("systemId=");
printQuotedString(identifier.getLiteralSystemId());
fOut.print(',");
fOut.print("baseSystemId=");
printQuotedString(identifier.getBaseSystemId());
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | fatalError(java.lang.String domain, java.lang.String key, org.apache.xerces.xni.parser.XMLParseException ex)Fatal error.
printError("Fatal Error", ex);
throw ex;
|
public void | ignorableWhitespace(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs)Ignorable whitespace.
printIndent();
fOut.print("ignorableWhitespace(");
fOut.print("text=");
printQuotedString(text.ch, text.offset, text.length);
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | ignoredCharacters(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs)Characters.
printIndent();
fOut.print("ignoredCharacters(");
fOut.print("text=");
printQuotedString(text.ch, text.offset, text.length);
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | internalEntityDecl(java.lang.String name, org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.XMLString nonNormalizedText, org.apache.xerces.xni.Augmentations augs)Internal entity declaration.
printIndent();
fOut.print("internalEntityDecl(");
fOut.print("name=");
printQuotedString(name);
fOut.print(',");
fOut.print("text=");
printQuotedString(text.ch, text.offset, text.length);
fOut.print(',");
fOut.print("nonNormalizedText=");
printQuotedString(nonNormalizedText.ch, nonNormalizedText.offset,
nonNormalizedText.length);
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public static void | main(java.lang.String[] argv)Main.
// is there anything to do?
if (argv.length == 0) {
printUsage();
System.exit(1);
}
// variables
XMLDocumentParser parser = null;
XMLParserConfiguration parserConfig = null;
boolean namespaces = DEFAULT_NAMESPACES;
boolean validation = DEFAULT_VALIDATION;
boolean schemaValidation = DEFAULT_SCHEMA_VALIDATION;
boolean schemaFullChecking = DEFAULT_SCHEMA_FULL_CHECKING;
boolean honourAllSchemaLocations = DEFAULT_HONOUR_ALL_SCHEMA_LOCATIONS;
boolean notifyCharRefs = DEFAULT_NOTIFY_CHAR_REFS;
// process arguments
for (int i = 0; i < argv.length; i++) {
String arg = argv[i];
if (arg.startsWith("-")) {
String option = arg.substring(1);
if (option.equals("p")) {
// get parser name
if (++i == argv.length) {
System.err.println("error: Missing argument to -p option.");
continue;
}
String parserName = argv[i];
// create parser
try {
parserConfig = (XMLParserConfiguration)ObjectFactory.newInstance(parserName,
ObjectFactory.findClassLoader(), true);
parser = null;
}
catch (Exception e) {
parserConfig = null;
System.err.println("error: Unable to instantiate parser configuration ("+parserName+")");
}
continue;
}
if (option.equalsIgnoreCase("n")) {
namespaces = option.equals("n");
continue;
}
if (option.equalsIgnoreCase("v")) {
validation = option.equals("v");
continue;
}
if (option.equalsIgnoreCase("s")) {
schemaValidation = option.equals("s");
continue;
}
if (option.equalsIgnoreCase("f")) {
schemaFullChecking = option.equals("f");
continue;
}
if (option.equalsIgnoreCase("hs")) {
honourAllSchemaLocations = option.equals("hs");
continue;
}
if (option.equalsIgnoreCase("c")) {
notifyCharRefs = option.equals("c");
continue;
}
if (option.equals("h")) {
printUsage();
continue;
}
}
// use default parser?
if (parserConfig == null) {
// create parser
try {
parserConfig = (XMLParserConfiguration)ObjectFactory.newInstance(DEFAULT_PARSER_CONFIG,
ObjectFactory.findClassLoader(), true);
}
catch (Exception e) {
System.err.println("error: Unable to instantiate parser configuration ("+DEFAULT_PARSER_CONFIG+")");
continue;
}
}
// set parser features
if (parser == null) {
parser = new DocumentTracer(parserConfig);
}
try {
parserConfig.setFeature(NAMESPACES_FEATURE_ID, namespaces);
}
catch (XMLConfigurationException e) {
System.err.println("warning: Parser does not support feature ("+NAMESPACES_FEATURE_ID+")");
}
try {
parserConfig.setFeature(VALIDATION_FEATURE_ID, validation);
}
catch (XMLConfigurationException e) {
System.err.println("warning: Parser does not support feature ("+VALIDATION_FEATURE_ID+")");
}
try {
parserConfig.setFeature(SCHEMA_VALIDATION_FEATURE_ID, schemaValidation);
}
catch (XMLConfigurationException e) {
if (e.getType() == XMLConfigurationException.NOT_SUPPORTED) {
System.err.println("warning: Parser does not support feature ("+SCHEMA_VALIDATION_FEATURE_ID+")");
}
}
try {
parserConfig.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, schemaFullChecking);
}
catch (XMLConfigurationException e) {
if (e.getType() == XMLConfigurationException.NOT_SUPPORTED) {
System.err.println("warning: Parser does not support feature ("+SCHEMA_FULL_CHECKING_FEATURE_ID+")");
}
}
try {
parserConfig.setFeature(HONOUR_ALL_SCHEMA_LOCATIONS_ID, honourAllSchemaLocations);
}
catch (XMLConfigurationException e) {
if (e.getType() == XMLConfigurationException.NOT_SUPPORTED) {
System.err.println("warning: Parser does not support feature ("+HONOUR_ALL_SCHEMA_LOCATIONS_ID+")");
}
}
try {
parserConfig.setFeature(NOTIFY_CHAR_REFS_FEATURE_ID, notifyCharRefs);
}
catch (XMLConfigurationException e) {
if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
//e.printStackTrace();
System.err.println("warning: Parser does not recognize feature ("+NOTIFY_CHAR_REFS_FEATURE_ID+")");
}
else {
System.err.println("warning: Parser does not support feature ("+NOTIFY_CHAR_REFS_FEATURE_ID+")");
}
}
// parse file
try {
parser.parse(new XMLInputSource(null, arg, null));
}
catch (XMLParseException e) {
// ignore
}
catch (Exception e) {
System.err.println("error: Parse error occurred - "+e.getMessage());
if (e instanceof XNIException) {
e = ((XNIException)e).getException();
}
e.printStackTrace(System.err);
}
}
|
protected void | normalizeAndPrint(char c)Normalize and print.
switch (c) {
case '\n": {
fOut.print("\\n");
break;
}
case '\r": {
fOut.print("\\r");
break;
}
case '\t": {
fOut.print("\\t");
break;
}
case '\\": {
fOut.print("\\\\");
break;
}
case '"": {
fOut.print("\\\"");
break;
}
default: {
fOut.print(c);
}
}
|
public void | notationDecl(java.lang.String name, org.apache.xerces.xni.XMLResourceIdentifier identifier, org.apache.xerces.xni.Augmentations augs)Notation declaration.
printIndent();
fOut.print("notationDecl(");
fOut.print("name=");
printQuotedString(name);
fOut.print(',");
fOut.print("publicId=");
printQuotedString(identifier.getPublicId());
fOut.print(',");
fOut.print("systemId=");
printQuotedString(identifier.getLiteralSystemId());
fOut.print(',");
fOut.print("baseSystemId=");
printQuotedString(identifier.getBaseSystemId());
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | occurrence(short occurrence, org.apache.xerces.xni.Augmentations augs)Occurrence.
printIndent();
fOut.print("occurrence(");
fOut.print("occurrence=");
switch (occurrence) {
case XMLDTDContentModelHandler.OCCURS_ONE_OR_MORE: {
fOut.print("OCCURS_ONE_OR_MORE");
break;
}
case XMLDTDContentModelHandler.OCCURS_ZERO_OR_MORE: {
fOut.print("OCCURS_ZERO_OR_MORE");
break;
}
case XMLDTDContentModelHandler.OCCURS_ZERO_OR_ONE: {
fOut.print("OCCURS_ZERO_OR_ONE");
break;
}
default: {
fOut.print("??? ("+occurrence+')");
}
}
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | pcdata(org.apache.xerces.xni.Augmentations augs)#PCDATA.
printIndent();
fOut.print("pcdata(");
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
protected void | printAugmentations(org.apache.xerces.xni.Augmentations augs)Prints augmentations.
fOut.print("augs={");
java.util.Enumeration keys = augs.keys();
while (keys.hasMoreElements()) {
String key = (String)keys.nextElement();
Object value = augs.getItem(key);
fOut.print(key);
fOut.print('#");
fOut.print(String.valueOf(value));
}
fOut.print('}");
|
protected void | printElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes)Prints an element.
fOut.print("element=");
fOut.print('{");
fOut.print("prefix=");
printQuotedString(element.prefix);
fOut.print(',");
fOut.print("localpart=");
printQuotedString(element.localpart);
fOut.print(',");
fOut.print("rawname=");
printQuotedString(element.rawname);
fOut.print(',");
fOut.print("uri=");
printQuotedString(element.uri);
fOut.print('}");
fOut.print(',");
fOut.print("attributes=");
if (attributes == null) {
fOut.println("null");
}
else {
fOut.print('{");
int length = attributes.getLength();
for (int i = 0; i < length; i++) {
if (i > 0) {
fOut.print(',");
}
attributes.getName(i, fQName);
String attrType = attributes.getType(i);
String attrValue = attributes.getValue(i);
String attrNonNormalizedValue = attributes.getNonNormalizedValue(i);
Augmentations augs = attributes.getAugmentations(i);
fOut.print("name=");
fOut.print('{");
fOut.print("prefix=");
printQuotedString(fQName.prefix);
fOut.print(',");
fOut.print("localpart=");
printQuotedString(fQName.localpart);
fOut.print(',");
fOut.print("rawname=");
printQuotedString(fQName.rawname);
fOut.print(',");
fOut.print("uri=");
printQuotedString(fQName.uri);
fOut.print('}");
fOut.print(',");
fOut.print("type=");
printQuotedString(attrType);
fOut.print(',");
fOut.print("value=");
printQuotedString(attrValue);
fOut.print(',");
fOut.print("nonNormalizedValue=");
printQuotedString(attrNonNormalizedValue);
if (attributes.isSpecified(i) == false ) {
fOut.print("(default)");
}
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.print('}");
}
fOut.print('}");
}
|
protected void | printEndNamespaceMapping()
int count = fNamespaceContext.getDeclaredPrefixCount();
if (count > 0) {
for (int i = 0; i < count; i++) {
printIndent();
fOut.print("endPrefix(");
fOut.print("prefix=");
String prefix = fNamespaceContext.getDeclaredPrefixAt(i);
printQuotedString(prefix);
fOut.println(')");
fOut.flush();
}
}
|
protected void | printError(java.lang.String type, org.apache.xerces.xni.parser.XMLParseException ex)Prints the error message.
System.err.print("[");
System.err.print(type);
System.err.print("] ");
String systemId = ex.getExpandedSystemId();
if (systemId != null) {
int index = systemId.lastIndexOf('/");
if (index != -1)
systemId = systemId.substring(index + 1);
System.err.print(systemId);
}
System.err.print(':");
System.err.print(ex.getLineNumber());
System.err.print(':");
System.err.print(ex.getColumnNumber());
System.err.print(": ");
System.err.print(ex.getMessage());
System.err.println();
System.err.flush();
|
protected void | printInScopeNamespaces()
int count = fNamespaceContext.getDeclaredPrefixCount();
if (count>0){
for (int i = 0; i < count; i++) {
printIndent();
fOut.print("declaredPrefix(");
fOut.print("prefix=");
String prefix = fNamespaceContext.getDeclaredPrefixAt(i);
printQuotedString(prefix);
fOut.print(',");
fOut.print("uri=");
printQuotedString(fNamespaceContext.getURI(prefix));
fOut.println(')");
fOut.flush();
}
}
|
protected void | printIndent()Prints the indent.
for (int i = 0; i < fIndent; i++) {
fOut.print(' ");
}
|
protected void | printQuotedString(java.lang.String s)Print quoted string.
if (s == null) {
fOut.print("null");
return;
}
fOut.print('"");
int length = s.length();
for (int i = 0; i < length; i++) {
char c = s.charAt(i);
normalizeAndPrint(c);
}
fOut.print('"");
|
protected void | printQuotedString(char[] ch, int offset, int length)Print quoted string.
fOut.print('"");
for (int i = 0; i < length; i++) {
normalizeAndPrint(ch[offset + i]);
}
fOut.print('"");
|
private static void | printUsage()Prints the usage.
System.err.println("usage: java xni.DocumentTracer (options) uri ...");
System.err.println();
System.err.println("options:");
System.err.println(" -p name Specify parser configuration by name.");
System.err.println(" -n | -N Turn on/off namespace processing.");
System.err.println(" -v | -V Turn on/off validation.");
System.err.println(" -s | -S Turn on/off Schema validation support.");
System.err.println(" NOTE: Not supported by all parser configurations.");
System.err.println(" -f | -F Turn on/off Schema full checking.");
System.err.println(" NOTE: Requires use of -s and not supported by all parsers.");
System.err.println(" -hs | -HS Turn on/off honouring of all schema locations.");
System.err.println(" NOTE: Requires use of -s and not supported by all parsers.");
System.err.println(" -c | -C Turn on/off character notifications");
System.err.println(" -h This help screen.");
System.err.println();
System.err.println("defaults:");
System.err.println(" Config: "+DEFAULT_PARSER_CONFIG);
System.err.print(" Namespaces: ");
System.err.println(DEFAULT_NAMESPACES ? "on" : "off");
System.err.print(" Validation: ");
System.err.println(DEFAULT_VALIDATION ? "on" : "off");
System.err.print(" Schema: ");
System.err.println(DEFAULT_SCHEMA_VALIDATION ? "on" : "off");
System.err.print(" Schema full checking: ");
System.err.println(DEFAULT_SCHEMA_FULL_CHECKING ? "on" : "off");
System.err.print(" Honour all schema locations: ");
System.err.println(DEFAULT_HONOUR_ALL_SCHEMA_LOCATIONS ? "on" : "off");
System.err.print(" Char refs: ");
System.err.println(DEFAULT_NOTIFY_CHAR_REFS ? "on" : "off" );
|
public void | processingInstruction(java.lang.String target, org.apache.xerces.xni.XMLString data, org.apache.xerces.xni.Augmentations augs)Processing instruction.
printIndent();
fOut.print("processingInstruction(");
fOut.print("target=");
printQuotedString(target);
fOut.print(',");
fOut.print("data=");
printQuotedString(data.ch, data.offset, data.length);
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | separator(short separator, org.apache.xerces.xni.Augmentations augs)separator.
printIndent();
fOut.print("separator(");
fOut.print("separator=");
switch (separator) {
case XMLDTDContentModelHandler.SEPARATOR_CHOICE: {
fOut.print("SEPARATOR_CHOICE");
break;
}
case XMLDTDContentModelHandler.SEPARATOR_SEQUENCE: {
fOut.print("SEPARATOR_SEQUENCE");
break;
}
default: {
fOut.print("??? ("+separator+')");
}
}
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | setOutput(java.io.OutputStream stream, java.lang.String encoding)Sets the output stream for printing.
if (encoding == null) {
encoding = "UTF8";
}
Writer writer = new OutputStreamWriter(stream, encoding);
fOut = new PrintWriter(writer);
|
public void | setOutput(java.io.Writer writer)Sets the output writer.
fOut = writer instanceof PrintWriter
? (PrintWriter)writer : new PrintWriter(writer);
|
public void | startAttlist(java.lang.String elementName, org.apache.xerces.xni.Augmentations augs)Start attribute list.
printIndent();
fOut.print("startAttlist(");
fOut.print("elementName=");
printQuotedString(elementName);
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
fIndent++;
|
public void | startCDATA(org.apache.xerces.xni.Augmentations augs)Start CDATA section.
printIndent();
fOut.print("startCDATA(");
if (augs != null) {
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
fIndent++;
|
public void | startConditional(short type, org.apache.xerces.xni.Augmentations augs)Start conditional section.
printIndent();
fOut.print("startConditional(");
fOut.print("type=");
switch (type) {
case XMLDTDHandler.CONDITIONAL_IGNORE: {
fOut.print("CONDITIONAL_IGNORE");
break;
}
case XMLDTDHandler.CONDITIONAL_INCLUDE: {
fOut.print("CONDITIONAL_INCLUDE");
break;
}
default: {
fOut.print("??? ("+type+')");
}
}
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
fIndent++;
|
public void | startContentModel(java.lang.String elementName, org.apache.xerces.xni.Augmentations augs)Start content model.
printIndent();
fOut.print("startContentModel(");
fOut.print("elementName=");
printQuotedString(elementName);
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
fIndent++;
|
public void | startDTD(org.apache.xerces.xni.XMLLocator locator, org.apache.xerces.xni.Augmentations augs)Start DTD.
printIndent();
fOut.print("startDTD(");
fOut.print("locator=");
if (locator == null) {
fOut.print("null");
}
else {
fOut.print('{");
fOut.print("publicId=");
printQuotedString(locator.getPublicId());
fOut.print(',");
fOut.print("literal systemId=");
printQuotedString(locator.getLiteralSystemId());
fOut.print(',");
fOut.print("baseSystemId=");
printQuotedString(locator.getBaseSystemId());
fOut.print(',");
fOut.print("expanded systemId=");
printQuotedString(locator.getExpandedSystemId());
fOut.print(',");
fOut.print("lineNumber=");
fOut.print(locator.getLineNumber());
fOut.print(',");
fOut.print("columnNumber=");
fOut.print(locator.getColumnNumber());
fOut.print('}");
}
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
fIndent++;
|
public void | startDocument(org.apache.xerces.xni.XMLLocator locator, java.lang.String encoding, org.apache.xerces.xni.NamespaceContext namespaceContext, org.apache.xerces.xni.Augmentations augs)The start of the document.
fNamespaceContext = namespaceContext;
fIndent = 0;
printIndent();
fOut.print("startDocument(");
fOut.print("locator=");
if (locator == null) {
fOut.print("null");
}
else {
fOut.print('{");
fOut.print("publicId=");
printQuotedString(locator.getPublicId());
fOut.print(',");
fOut.print("literal systemId=");
printQuotedString(locator.getLiteralSystemId());
fOut.print(',");
fOut.print("baseSystemId=");
printQuotedString(locator.getBaseSystemId());
fOut.print(',");
fOut.print("expanded systemId=");
printQuotedString(locator.getExpandedSystemId());
fOut.print(',");
fOut.print("lineNumber=");
fOut.print(locator.getLineNumber());
fOut.print(',");
fOut.print("columnNumber=");
fOut.print(locator.getColumnNumber());
fOut.print('}");
}
fOut.print(',");
fOut.print("encoding=");
printQuotedString(encoding);
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
fIndent++;
|
public void | startElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.Augmentations augs)Start element.
printInScopeNamespaces();
printIndent();
fOut.print("startElement(");
printElement(element, attributes);
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
fIndent++;
|
public void | startExternalSubset(org.apache.xerces.xni.XMLResourceIdentifier identifier, org.apache.xerces.xni.Augmentations augs)Start external subset.
printIndent();
fOut.print("startExternalSubset(");
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
fIndent++;
|
public void | startGeneralEntity(java.lang.String name, org.apache.xerces.xni.XMLResourceIdentifier identifier, java.lang.String encoding, org.apache.xerces.xni.Augmentations augs)Start entity.
printIndent();
fOut.print("startGeneralEntity(");
fOut.print("name=");
printQuotedString(name);
fOut.print(',");
fOut.print("identifier=");
fOut.print(identifier);
fOut.print(',");
fOut.print("encoding=");
printQuotedString(encoding);
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
fIndent++;
|
public void | startGroup(org.apache.xerces.xni.Augmentations augs)Start group.
printIndent();
fOut.print("startGroup(");
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
fIndent++;
|
public void | startParameterEntity(java.lang.String name, org.apache.xerces.xni.XMLResourceIdentifier identifier, java.lang.String encoding, org.apache.xerces.xni.Augmentations augs)Start entity.
printIndent();
fOut.print("startParameterEntity(");
fOut.print("name=");
printQuotedString(name);
fOut.print(',");
fOut.print("identifier=");
fOut.print(identifier);
fOut.print(',");
fOut.print("encoding=");
printQuotedString(encoding);
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
fIndent++;
|
public void | textDecl(java.lang.String version, java.lang.String encoding, org.apache.xerces.xni.Augmentations augs)Text declaration.
printIndent();
fOut.print("textDecl(");
fOut.print("version=");
printQuotedString(version);
fOut.print(',");
fOut.print("encoding=");
printQuotedString(encoding);
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | unparsedEntityDecl(java.lang.String name, org.apache.xerces.xni.XMLResourceIdentifier identifier, java.lang.String notation, org.apache.xerces.xni.Augmentations augs)Unparsed entity declaration.
printIndent();
fOut.print("unparsedEntityDecl(");
fOut.print("name=");
printQuotedString(name);
fOut.print(',");
fOut.print("publicId=");
printQuotedString(identifier.getPublicId());
fOut.print(',");
fOut.print("systemId=");
printQuotedString(identifier.getLiteralSystemId());
fOut.print(',");
fOut.print("baseSystemId=");
printQuotedString(identifier.getBaseSystemId());
fOut.print(',");
fOut.print("notation=");
printQuotedString(notation);
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
fOut.flush();
|
public void | warning(java.lang.String domain, java.lang.String key, org.apache.xerces.xni.parser.XMLParseException ex)Warning.
printError("Warning", ex);
|
public void | xmlDecl(java.lang.String version, java.lang.String encoding, java.lang.String standalone, org.apache.xerces.xni.Augmentations augs)XML Declaration.
printIndent();
fOut.print("xmlDecl(");
fOut.print("version=");
printQuotedString(version);
fOut.print(',");
fOut.print("encoding=");
printQuotedString(encoding);
fOut.print(',");
fOut.print("standalone=");
printQuotedString(standalone);
if (augs != null) {
fOut.print(',");
printAugmentations(augs);
}
fOut.println(')");
|