Skip to content

Commit

Permalink
location
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Dec 4, 2024
1 parent 0035ef7 commit d7821fa
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
13 changes: 12 additions & 1 deletion eo-parser/src/main/java/org/eolang/parser/CheckPack.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@
import com.jcabi.log.Logger;
import com.jcabi.xml.StrictXML;
import com.jcabi.xml.XML;
import com.jcabi.xml.XSLDocument;
import com.yegor256.xsline.Shift;
import com.yegor256.xsline.StClasspath;
import com.yegor256.xsline.StXSL;
import com.yegor256.xsline.Train;
import com.yegor256.xsline.Xsline;
import java.io.IOException;
import java.nio.file.Paths;
import java.util.Collection;
import java.util.LinkedList;
import java.util.Map;
Expand Down Expand Up @@ -76,7 +79,15 @@ public Collection<String> failures() throws IOException {
train = train.empty();
}
for (final String xsl : xsls) {
train = train.with(new StClasspath(xsl));
if (xsl.startsWith("file://")) {
train = train.with(
new StXSL(
new XSLDocument(Paths.get(xsl.substring(7)))
)
);
} else {
train = train.with(new StClasspath(xsl));
}
}
}
final XML out = new StrictXML(
Expand Down
4 changes: 4 additions & 0 deletions eo-parser/src/main/java/org/eolang/parser/DrProgram.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,12 @@ private static String schema() {
"src/main/resources/XMIR.xsd",
"eo-parser/src/main/resources/XMIR.xsd",
"../eo-parser/src/main/resources/XMIR.xsd",
System.getProperty("xmir.xsd", ""),
};
for (final String opt : opts) {
if (opt.isEmpty()) {
continue;
}
final Path path = Paths.get(opt).toAbsolutePath();
if (path.toFile().exists()) {
schema = String.format(
Expand Down
1 change: 1 addition & 0 deletions eo-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ SOFTWARE.
</argLine>
<systemPropertyVariables combine.children="append">
<java.class.path>${project.build.outputDirectory}</java.class.path>
<xmir.xsd>${project.basedir}/../eo-parser/src/main/resources/XMIR.xsd</xmir.xsd>
</systemPropertyVariables>
</configuration>
</execution>
Expand Down

0 comments on commit d7821fa

Please sign in to comment.