Skip to content

Commit

Permalink
#135 show XML
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Dec 2, 2024
1 parent 41ebdf4 commit 29bc131
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ XML output = new Xsline(train).pass(input);
This will transform your `input` XML document
through two XSL stylesheets.

We use this library in
[EO-to-Java compiler](https://github.com/objectionary/eo).

## How to Contribute

Fork repository, make changes, send us a
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/com/yegor256/xsline/StSchema.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
package com.yegor256.xsline;

import com.jcabi.log.Logger;
import com.jcabi.xml.XML;
import com.jcabi.xml.XMLDocument;
import java.io.FileNotFoundException;
Expand Down Expand Up @@ -105,6 +106,14 @@ private static XML validate(final XML schema, final XML xml) {
)
);
}
if (Logger.isDebugEnabled(StSchema.class)) {
Logger.debug(
StSchema.class,
"There are %d XSD violation(s) in this XML:%n%s",
violations.size(),
xml
);
}
throw new IllegalStateException(
String.format(
"There are %d XSD violation(s): %s",
Expand Down

0 comments on commit 29bc131

Please sign in to comment.