Commit 32a1b8a5 authored by Stephan Kreutzer's avatar Stephan Kreutzer

xhtml_to_glossary_1 workflow added.

parent 477219f0
# Copyright (C) 2016-2018 Stephan Kreutzer
# Copyright (C) 2016-2019 Stephan Kreutzer
#
# This file is part of digital_publishing_workflow_tools.
#
......@@ -16,7 +16,7 @@
directories = ./onix_to_woocommerce ./resource_retriever ./setup ./wordpress_client ./wordpress_media_library_file_uploader ./wordpress_retriever
directories = ./onix_to_woocommerce ./resource_retriever ./setup ./wordpress_client ./wordpress_media_library_file_uploader ./wordpress_retriever ./xhtml_to_glossary
......
......@@ -52,7 +52,7 @@ messageJobFileWooCommerceRESTAPIProductsURLIsntConfigured = WooCommerce REST API
messageJobFileWooCommerceRESTAPIPublicKeyIsntConfigured = WooCommerce REST API public key isn''t configured in a "{2}" attribute of element "{1}" in job file "{0}".
messageJobFileWooCommerceRESTAPISecretKeyIsntConfigured = WooCommerce REST API secret key isn''t configured in a "{2}" attribute of element "{1}" in job file "{0}".
messageJobFileWordpressMediaLibraryFileUploader1WorkflowInputJobFileIsntConfigured = wordpress_media_library_file_uploader_1 workflow input job file not configured in a "{1}" element in the job file "{0}".
messageOutputDirectoryCantCreate = Output directory "{1}" as configured in job file "{0}" can't be created.
messageOutputDirectoryCantCreate = Output directory "{1}" as configured in job file "{0}" can''t be created.
messageWordpressMediaLibraryFileUploader1WorkflowInputJobFileWordpressXmlRpcUrlConfiguredMoreThanOnce = Element "{1}" configured more than once in wordpress_media_library_file_uploader_1 workflow input job file "{0}".
messageWordpressMediaLibraryFileUploader1WorkflowInputJobFileEntryIsMissingAnAttribute = Element "{1}" in wordpress_media_library_file_uploader_1 workflow input job file "{0}" is missing its "{2}" attribute.
messageWordpressMediaLibraryFileUploader1WorkflowInputJobFileSettingConfiguredMoreThanOnce = Attribute "{2}" in an "{1}" element configured more than once in wordpress_media_library_file_uploader_1 workflow input job file "{0}".
......
# Copyright (C) 2018-2019 Stephan Kreutzer
#
# This file is part of digital_publishing_workflow_tools.
#
# digital_publishing_workflow_tools is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License version 3 or any later version,
# as published by the Free Software Foundation.
#
# digital_publishing_workflow_tools is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License 3 for more details.
#
# You should have received a copy of the GNU Affero General Public License 3
# along with digital_publishing_workflow_tools. If not, see <http://www.gnu.org/licenses/>.
directories = ./xhtml_to_glossary_1
.PHONY: all $(directories)
all: $(directories)
$(directories):
$(MAKE) --directory=[email protected]
/* Copyright (C) 2016-2019 Stephan Kreutzer
*
* This file is part of xhtml_to_glossary_1 workflow, a submodule of the
* digital_publishing_workflow_tools package.
*
* xhtml_to_glossary_1 workflow is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License version 3 or any later version,
* as published by the Free Software Foundation.
*
* xhtml_to_glossary_1 workflow is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License 3 for more details.
*
* You should have received a copy of the GNU Affero General Public License 3
* along with xhtml_to_glossary_1 workflow. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file $/workflows/xhtml_to_glossary/xhtml_to_glossary_1/InfoMessage.java
* @brief For normal messages during xhtml_to_glossary_1 workflow execution.
* @author Stephan Kreutzer
* @since 2016-01-04
*/
import java.util.TimeZone;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
class InfoMessage
{
public InfoMessage(String id,
Exception exception,
String message,
String bundle,
Object ... arguments)
{
this.id = id;
this.exception = exception;
this.message = message;
this.bundle = bundle;
this.arguments = arguments;
TimeZone timeZone = TimeZone.getTimeZone("UTC");
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
dateFormat.setTimeZone(timeZone);
this.timestamp = dateFormat.format(new Date());
}
public String getId()
{
return this.id;
}
public Exception getException()
{
return this.exception;
}
public String getMessage()
{
return this.message;
}
public String getBundle()
{
return this.bundle;
}
public Object[] getArguments()
{
return this.arguments;
}
public String getTimestamp()
{
return this.timestamp;
}
protected String id;
protected Exception exception;
protected String message;
protected String bundle;
protected Object[] arguments;
protected String timestamp;
}
/* Copyright (C) 2015-2019 Stephan Kreutzer
*
* This file is part of xhtml_to_glossary_1 workflow, a submodule of the
* digital_publishing_workflow_tools package.
*
* xhtml_to_glossary_1 workflow is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License version 3 or any later version,
* as published by the Free Software Foundation.
*
* xhtml_to_glossary_1 workflow is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License 3 for more details.
*
* You should have received a copy of the GNU Affero General Public License 3
* along with xhtml_to_glossary_1 workflow. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file $/workflows/xhtml_to_glossary/xhtml_to_glossary_1/ProgramTerminationException.java
* @brief Handles error reporting and program termination for xhtml_to_glossary_1 workflow.
* @author Stephan Kreutzer
* @since 2016-01-02
*/
import java.util.TimeZone;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
class ProgramTerminationException extends RuntimeException
{
public ProgramTerminationException(String id,
Exception cause,
String message,
String bundle,
Object ... arguments)
{
super(message, cause);
this.id = id;
this.bundle = bundle;
this.arguments = arguments;
this.normalTermination = false;
TimeZone timeZone = TimeZone.getTimeZone("UTC");
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
dateFormat.setTimeZone(timeZone);
this.timestamp = dateFormat.format(new Date());
}
public String getId()
{
return this.id;
}
public String getBundle()
{
return this.bundle;
}
public Object[] getArguments()
{
return this.arguments;
}
public String getTimestamp()
{
return this.timestamp;
}
public boolean isNormalTermination()
{
return this.normalTermination;
}
public void setNormalTermination(boolean normalTermination)
{
this.normalTermination = normalTermination;
}
protected String id;
protected String bundle;
protected Object[] arguments;
protected String timestamp;
protected boolean normalTermination;
}
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2016-2019 Stephan Kreutzer
This file is part of xhtml_to_glossary_1 workflow, a submodule of the
digital_publishing_workflow_tools package.
xhtml_to_glossary_1 workflow is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3 or any later version,
as published by the Free Software Foundation.
xhtml_to_glossary_1 workflow is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License 3 for more details.
You should have received a copy of the GNU Affero General Public License 3
along with xhtml_to_glossary_1 workflow. If not, see <http://www.gnu.org/licenses/>.
-->
<xhtml-to-glossary-1-workflow-jobfile>
<!--input-glossary-file path="./glossary.xml"/-->
<!--input-target-file path="./input.xhtml"/-->
<!--output-directory path="./output/"/-->
</xhtml-to-glossary-1-workflow-jobfile>
# Copyright (C) 2016-2019 Stephan Kreutzer
#
# This file is part of xhtml_to_glossary_1 workflow, a submodule of the
# digital_publishing_workflow_tools package.
#
# xhtml_to_glossary_1 workflow is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License version 3 or any later version,
# as published by the Free Software Foundation.
#
# xhtml_to_glossary_1 workflow is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License 3 for more details.
#
# You should have received a copy of the GNU Affero General Public License 3
# along with xhtml_to_glossary_1 workflow. If not, see <http://www.gnu.org/licenses/>.
.PHONY: all xhtml_to_glossary_1 clean
all: xhtml_to_glossary_1
xhtml_to_glossary_1: xhtml_to_glossary_1.class
InfoMessage.class: InfoMessage.java
javac -encoding UTF-8 InfoMessage.java
ProgramTerminationException.class: ProgramTerminationException.java
javac -encoding UTF-8 ProgramTerminationException.java
xhtml_to_glossary_1.class: xhtml_to_glossary_1.java InfoMessage.class ProgramTerminationException.class
javac -encoding UTF-8 xhtml_to_glossary_1.java
clean:
rm -f xhtml_to_glossary_1.class
rm -f ProgramTerminationException.class
rm -f InfoMessage.class
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2018-2019 Stephan Kreutzer
This file is part of xhtml_to_glossary_1 workflow, a submodule of the
digital_publishing_workflow_tools package.
xhtml_to_glossary_1 workflow is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3 or any later version,
as published by the Free Software Foundation.
xhtml_to_glossary_1 workflow is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License 3 for more details.
You should have received a copy of the GNU Affero General Public License 3
along with xhtml_to_glossary_1 workflow. If not, see <http://www.gnu.org/licenses/>.
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:xhtml-src="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xhtml-src">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<html version="-//W3C//DTD XHTML 1.1//EN" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/1999/xhtml http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
<xsl:text>&#x0A;</xsl:text>
<xsl:comment> This file was created by xhtml_filter_target.xsl of xhtml_to_glossary_1 workflow, which is free software licensed under the GNU Affero General Public License 3 or any later version (see http://www.hypertext-systems.org). </xsl:comment>
<xsl:text>&#x0A;</xsl:text>
<title>
<xsl:value-of select="./xhtml-src:html/xhtml-src:head/xhtml-src:title//text()"/>
</title>
</head>
<body>
<xsl:apply-templates select="./xhtml-src:html/xhtml-src:body"/>
</body>
</html>
</xsl:template>
<xsl:template match="/xhtml-src:html/xhtml-src:body">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="/xhtml-src:html/xhtml-src:body//text()">
<xsl:copy/>
</xsl:template>
<xsl:template match="/xhtml-src:html/xhtml-src:body//xhtml-src:p">
<p>
<xsl:apply-templates/>
</p>
</xsl:template>
<xsl:template match="/xhtml-src:html/xhtml-src:body//xhtml-src:ol">
<ol>
<xsl:apply-templates/>
</ol>
</xsl:template>
<xsl:template match="/xhtml-src:html/xhtml-src:body//xhtml-src:ul">
<ul>
<xsl:apply-templates/>
</ul>
</xsl:template>
<xsl:template match="/xhtml-src:html/xhtml-src:body//xhtml-src:li">
<li>
<xsl:apply-templates/>
</li>
</xsl:template>
<xsl:template match="/xhtml-src:html/xhtml-src:body//xhtml-src:a">
<a href="{@href}">
<xsl:apply-templates/>
</a>
</xsl:template>
<xsl:template match="text()"/>
</xsl:stylesheet>
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment