Skip to content

Commit

Permalink
Merge branch 'feature/epub-13' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
io7m committed Jul 8, 2021
2 parents e759185 + 5062998 commit 9d9b72a
Show file tree
Hide file tree
Showing 150 changed files with 14,366 additions and 3,768 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/main-openjdk_current-linux.yml
Expand Up @@ -17,3 +17,9 @@ jobs:
java-version: 15
- name: Build
run: mvn --errors clean verify site
- name: Upload test logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: test-logs
path: ./com.io7m.xstructural.tests/target/surefire-reports
6 changes: 6 additions & 0 deletions .github/workflows/main-openjdk_current-windows.yml
Expand Up @@ -17,3 +17,9 @@ jobs:
java-version: 15
- name: Build
run: mvn --errors clean verify site
- name: Upload test logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: test-logs
path: ./com.io7m.xstructural.tests/target/surefire-reports
8 changes: 7 additions & 1 deletion .github/workflows/main-openjdk_lts-linux.yml
Expand Up @@ -16,7 +16,13 @@ jobs:
with:
java-version: 11
- name: Build
run: mvn --errors clean verify site
run: env MAVEN_OPTS="-Xss2048k" mvn --errors clean verify site
- name: Upload test logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: test-logs
path: ./com.io7m.xstructural.tests/target/surefire-reports
- name: Coverage
uses: codecov/codecov-action@v1
with:
Expand Down
11 changes: 9 additions & 2 deletions README-CHANGES.xml
Expand Up @@ -24,8 +24,15 @@
<c:change date="2020-12-19T00:00:00+00:00" summary="Slightly improve the CSS for table elements"/>
</c:changes>
</c:release>
<c:release date="2020-12-20T11:13:41+00:00" is-open="true" ticket-system="com.github.io7m.xstructural" version="1.3.0">
<c:changes/>
<c:release date="2021-06-27T16:34:56+00:00" is-open="true" ticket-system="com.github.io7m.xstructural" version="1.3.0">
<c:changes>
<c:change date="2021-06-27T00:00:00+00:00" summary="Add EPUB support">
<c:tickets>
<c:ticket id="13"/>
</c:tickets>
</c:change>
<c:change date="2021-06-27T16:34:56+00:00" summary="Fix a schema bug that rejected valid footnotes in documents"/>
</c:changes>
</c:release>
</c:releases>
<c:ticket-systems>
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright © 2020 Mark Raynsford <code@io7m.com> http://io7m.com
* 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
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright © 2020 Mark Raynsford <code@io7m.com> http://io7m.com
* 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
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright © 2020 Mark Raynsford <code@io7m.com> http://io7m.com
* 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
Expand Down Expand Up @@ -98,6 +98,12 @@ default Path messageFile()

Optional<Path> brandingFile();

/**
* @return The name of the output file, if relevant to the operation
*/

Optional<String> outputName();

/**
* The stylesheet that will be used during processing.
*/
Expand All @@ -116,7 +122,14 @@ enum Stylesheet
* per section.
*/

MULTIPLE_FILE
MULTIPLE_FILE,

/**
* The EPUB stylesheet. Produces a set of output files suitable for
* use in an EPUB file.
*/

EPUB
}

/**
Expand All @@ -136,7 +149,20 @@ enum Task
* The input document will be transformed to XHTML.
*/

TRANSFORM_XHTML
TRANSFORM_XHTML,

/**
* The input document will be transformed to an EPUB.
*/

TRANSFORM_EPUB,

/**
* The input XHTML will be validated, and no other steps will be
* performed.
*/

VALIDATE_XHTML,
}

/**
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright © 2020 Mark Raynsford <code@io7m.com> http://io7m.com
* 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
Expand Down
@@ -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();
}
}
@@ -1,5 +1,5 @@
/*
* Copyright © 2020 Mark Raynsford <code@io7m.com> http://io7m.com
* 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
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright © 2020 Mark Raynsford <code@io7m.com> http://io7m.com
* 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
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright © 2020 Mark Raynsford <code@io7m.com> http://io7m.com
* 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
Expand All @@ -19,7 +19,7 @@
*/

@Export
@Version("1.0.0")
@Version("1.1.0")
package com.io7m.xstructural.api;

import org.osgi.annotation.bundle.Export;
Expand Down
2 changes: 1 addition & 1 deletion com.io7m.xstructural.api/src/main/java/module-info.java
@@ -1,5 +1,5 @@
/*
* Copyright © 2020 Mark Raynsford <code@io7m.com> http://io7m.com
* 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
Expand Down
5 changes: 5 additions & 0 deletions com.io7m.xstructural.cmdline/pom.xml
Expand Up @@ -115,6 +115,11 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.github.zlika</groupId>
<artifactId>reproducible-build-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright © 2020 Mark Raynsford <code@io7m.com> http://io7m.com
* 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
Expand Down Expand Up @@ -53,19 +53,25 @@ public Main(

final XSCommandRoot r = new XSCommandRoot();
final var validate = new XSCommandValidate();
final var validateXhtml = new XSCommandValidateXHTML();
final var xhtml = new XSCommandTransformXHTML();
final var epub = new XSCommandTransformEPUB();
final var schema = new XSCommandSchema();

this.commands = new HashMap<>(8);
this.commands.put("epub", epub);
this.commands.put("schema", schema);
this.commands.put("validate", validate);
this.commands.put("validate-xhtml", validateXhtml);
this.commands.put("xhtml", xhtml);
this.commands.put("schema", schema);

this.commander = new JCommander(r);
this.commander.setProgramName("xstructural");
this.commander.addCommand("epub", epub);
this.commander.addCommand("schema", schema);
this.commander.addCommand("validate", validate);
this.commander.addCommand("validate-xhtml", validateXhtml);
this.commander.addCommand("xhtml", xhtml);
this.commander.addCommand("schema", schema);
}

/**
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright © 2020 Mark Raynsford <code@io7m.com> http://io7m.com
* 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
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright © 2020 Mark Raynsford <code@io7m.com> http://io7m.com
* 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
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright © 2020 Mark Raynsford <code@io7m.com> http://io7m.com
* 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
Expand Down

0 comments on commit 9d9b72a

Please sign in to comment.