Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This completely rewrites all of the stylesheets, and adds a hard division between version 7 and version 8 of the schema. Affects: #13
- Loading branch information
Showing
132 changed files
with
9,703 additions
and
4,364 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
com.io7m.xstructural.api/src/main/java/com/io7m/xstructural/api/XSProcessorException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
com.io7m.xstructural.api/src/main/java/com/io7m/xstructural/api/XSProcessorFactoryType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
com.io7m.xstructural.api/src/main/java/com/io7m/xstructural/api/XSProcessorType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
com.io7m.xstructural.api/src/main/java/com/io7m/xstructural/api/XSSchemas.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* | ||
* Copyright © 2021 Mark Raynsford <code@io7m.com> https://www.io7m.com | ||
* | ||
* Permission to use, copy, modify, and/or distribute this software for any | ||
* purpose with or without fee is hereby granted, provided that the above | ||
* copyright notice and this permission notice appear in all copies. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY | ||
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR | ||
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
*/ | ||
|
||
package com.io7m.xstructural.api; | ||
|
||
import java.net.URI; | ||
import java.util.Set; | ||
|
||
/** | ||
* The known structural schemas. | ||
*/ | ||
|
||
public final class XSSchemas | ||
{ | ||
private XSSchemas() | ||
{ | ||
|
||
} | ||
|
||
/** | ||
* @return The set of known structural schemas | ||
*/ | ||
|
||
public static Set<URI> namespaces() | ||
{ | ||
return Set.of( | ||
namespace7p0(), | ||
namespace8p0() | ||
); | ||
} | ||
|
||
/** | ||
* @return The structural 7.0 schema | ||
*/ | ||
|
||
public static URI namespace7p0() | ||
{ | ||
return URI.create("urn:com.io7m.structural:7:0"); | ||
} | ||
|
||
/** | ||
* @return The structural 7.0 schema | ||
*/ | ||
|
||
public static String namespace7p0s() | ||
{ | ||
return namespace7p0().toString(); | ||
} | ||
|
||
/** | ||
* @return The structural 8.0 schema | ||
*/ | ||
|
||
public static URI namespace8p0() | ||
{ | ||
return URI.create("urn:com.io7m.structural:8:0"); | ||
} | ||
|
||
/** | ||
* @return The structural 8.0 schema | ||
*/ | ||
|
||
public static String namespace8p0s() | ||
{ | ||
return namespace8p0().toString(); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
com.io7m.xstructural.api/src/main/java/com/io7m/xstructural/api/XSTransformException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
com.io7m.xstructural.api/src/main/java/com/io7m/xstructural/api/XSValidationException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
com.io7m.xstructural.api/src/main/java/com/io7m/xstructural/api/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
com.io7m.xstructural.cmdline/src/main/java/com/io7m/xstructural/cmdline/MainExitless.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
com.io7m.xstructural.cmdline/src/main/java/com/io7m/xstructural/cmdline/XSCommandRoot.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
com.io7m.xstructural.cmdline/src/main/java/com/io7m/xstructural/cmdline/XSCommandSchema.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...structural.cmdline/src/main/java/com/io7m/xstructural/cmdline/XSCommandTransformEPUB.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tructural.cmdline/src/main/java/com/io7m/xstructural/cmdline/XSCommandTransformXHTML.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
com.io7m.xstructural.cmdline/src/main/java/com/io7m/xstructural/cmdline/XSCommandType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...o7m.xstructural.cmdline/src/main/java/com/io7m/xstructural/cmdline/XSCommandValidate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
...structural.cmdline/src/main/java/com/io7m/xstructural/cmdline/XSCommandValidateXHTML.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* | ||
* Copyright © 2021 Mark Raynsford <code@io7m.com> https://www.io7m.com | ||
* | ||
* Permission to use, copy, modify, and/or distribute this software for any | ||
* purpose with or without fee is hereby granted, provided that the above | ||
* copyright notice and this permission notice appear in all copies. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY | ||
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR | ||
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
*/ | ||
|
||
package com.io7m.xstructural.cmdline; | ||
|
||
import com.beust.jcommander.Parameter; | ||
import com.beust.jcommander.Parameters; | ||
import com.io7m.xstructural.api.XSProcessorRequest; | ||
import com.io7m.xstructural.cmdline.internal.XSServices; | ||
|
||
import java.nio.file.Files; | ||
import java.nio.file.Path; | ||
|
||
import static com.io7m.xstructural.api.XSProcessorRequestType.Task; | ||
|
||
@Parameters(commandDescription = "Validate an XHTML document") | ||
final class XSCommandValidateXHTML extends XSCommandRoot | ||
{ | ||
@Parameter( | ||
required = true, | ||
description = "The source directory", | ||
names = "--sourceDirectory" | ||
) | ||
private Path sourceDirectory; | ||
|
||
XSCommandValidateXHTML() | ||
{ | ||
|
||
} | ||
|
||
@Override | ||
public Status execute() | ||
throws Exception | ||
{ | ||
if (super.execute() == Status.FAILURE) { | ||
return Status.FAILURE; | ||
} | ||
|
||
final var directory = Files.createTempDirectory("xstructural-"); | ||
Files.deleteIfExists(directory); | ||
|
||
final var tempFile = Files.createTempFile("xstructural", ".tmp"); | ||
try { | ||
final var requestBuilder = XSProcessorRequest.builder(); | ||
requestBuilder.setOutputDirectory(this.sourceDirectory.toAbsolutePath()); | ||
requestBuilder.setSourceFile(tempFile); | ||
requestBuilder.setTask(Task.VALIDATE_XHTML); | ||
|
||
final var request = requestBuilder.build(); | ||
final var processors = XSServices.findProcessors(); | ||
final var processor = processors.create(request); | ||
processor.execute(); | ||
return Status.SUCCESS; | ||
} finally { | ||
Files.deleteIfExists(tempFile); | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
com.io7m.xstructural.cmdline/src/main/java/com/io7m/xstructural/cmdline/XSLogLevel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...m.xstructural.cmdline/src/main/java/com/io7m/xstructural/cmdline/XSLogLevelConverter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...structural.cmdline/src/main/java/com/io7m/xstructural/cmdline/XSLogLevelUnrecognized.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...xstructural.cmdline/src/main/java/com/io7m/xstructural/cmdline/XSStylesheetConverter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ructural.cmdline/src/main/java/com/io7m/xstructural/cmdline/XSStylesheetUnrecognized.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...m.xstructural.cmdline/src/main/java/com/io7m/xstructural/cmdline/internal/XSServices.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...xstructural.cmdline/src/main/java/com/io7m/xstructural/cmdline/internal/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
com.io7m.xstructural.cmdline/src/main/java/com/io7m/xstructural/cmdline/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...m.xstructural.documentation/src/main/resources/com/io7m/xstructural/documentation/api.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.