Skip to content

Commit

Permalink
Fix issue #107 make sure the prefix associated with an error code is …
Browse files Browse the repository at this point in the history
…declared
  • Loading branch information
ndw committed Jul 25, 2013
1 parent 0d910cd commit 49e961e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/com/xmlcalabash/util/StepErrorListener.java
Expand Up @@ -74,7 +74,6 @@ private boolean report(String type, TransformerException exception) {

writer.startDocument(baseURI);
writer.addStartElement(c_error);
writer.addAttribute(_type, type);

String message = exception.toString();
StructuredQName qCode = null;
Expand All @@ -95,9 +94,12 @@ private boolean report(String type, TransformerException exception) {
qCode = ((XPathException) exception.getException()).getErrorCodeQName();
}
if (qCode != null) {
writer.addNamespace(qCode.getPrefix(), qCode.getNamespaceBinding().getURI());
writer.addAttribute(_code, qCode.getDisplayName());
}

writer.addAttribute(_type, type);

if (exception.getLocator() != null) {
SourceLocator loc = exception.getLocator();
boolean done = false;
Expand Down

0 comments on commit 49e961e

Please sign in to comment.