Author: mrglavas
Date: Thu Oct 16 14:43:38 2008
New Revision: 705370
URL: http://svn.apache.org/viewvc?rev=705370&view=rev
Log:
Improving debug info exposed by XSDocumentInfo. toString() now returns the
targetNamespace and the schemaLocation.
Modified:
xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDocumentInfo.java
Modified:
xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDocumentInfo.java
URL:
http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDocumentInfo.java?rev=705370&r1=705369&r2=705370&view=diff
==============================================================================
---
xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDocumentInfo.java
(original)
+++
xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDocumentInfo.java
Thu Oct 16 14:43:38 2008
@@ -26,6 +26,7 @@
import org.apache.xerces.impl.xs.XMLSchemaException;
import org.apache.xerces.impl.xs.util.XInt;
import org.apache.xerces.util.SymbolTable;
+import org.w3c.dom.Document;
import org.w3c.dom.Element;
/**
@@ -150,7 +151,23 @@
// some Object methods
public String toString() {
- return fTargetNamespace == null?"no targetNamspace":"targetNamespace
is " + fTargetNamespace;
+ StringBuffer buf = new StringBuffer();
+ if (fTargetNamespace == null) {
+ buf.append("no targetNamspace");
+ }
+ else {
+ buf.append("targetNamespace is ");
+ buf.append(fTargetNamespace);
+ }
+ Document doc = (fSchemaElement != null) ?
fSchemaElement.getOwnerDocument() : null;
+ if (doc instanceof org.apache.xerces.impl.xs.opti.SchemaDOM) {
+ String documentURI = doc.getDocumentURI();
+ if (documentURI != null && documentURI.length() > 0) {
+ buf.append(" :: schemaLocation is ");
+ buf.append(documentURI);
+ }
+ }
+ return buf.toString();
}
public void addAllowedNS(String namespace) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]