dita-convert 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
dita/__init__.py ADDED
File without changes
@@ -0,0 +1,36 @@
1
+ # Copyright (C) 2024 Jaromir Hradilek
2
+
3
+ # MIT License
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining
6
+ # a copy of this software and associated documentation files (the "Soft-
7
+ # ware"), to deal in the Software without restriction, including without
8
+ # limitation the rights to use, copy, modify, merge, publish, distribute,
9
+ # sublicense, and/or sell copies of the Software, and to permit persons to
10
+ # whom the Software is furnished to do so, subject to the following condi-
11
+ # tions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included
14
+ # in all copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17
+ # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABI-
18
+ # LITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
19
+ # SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
20
+ # OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ # OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ """Convert a generic DITA topic to a specialized concept, task, or reference."""
25
+
26
+ # Module metadata:
27
+ __author__ = 'Jaromir Hradilek'
28
+ __copyright__ = 'Copyright (C) 2024 Jaromir Hradilek'
29
+ __license__ = 'MIT License'
30
+ __description__ = __doc__
31
+ __version__ = '1.0.0'
32
+
33
+ # Expose general information about the project:
34
+ NAME = 'dita-convert'
35
+ VERSION = __version__
36
+ DESCRIPTION = __doc__
@@ -0,0 +1,27 @@
1
+ # Copyright (C) 2024 Jaromir Hradilek
2
+
3
+ # MIT License
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining
6
+ # a copy of this software and associated documentation files (the "Soft-
7
+ # ware"), to deal in the Software without restriction, including without
8
+ # limitation the rights to use, copy, modify, merge, publish, distribute,
9
+ # sublicense, and/or sell copies of the Software, and to permit persons to
10
+ # whom the Software is furnished to do so, subject to the following condi-
11
+ # tions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included
14
+ # in all copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17
+ # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABI-
18
+ # LITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
19
+ # SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
20
+ # OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ # OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ from . import cli
25
+
26
+ if __name__ == '__main__':
27
+ cli.parse_args()
dita/convert/cli.py ADDED
@@ -0,0 +1,116 @@
1
+ # Copyright (C) 2024 Jaromir Hradilek
2
+
3
+ # MIT License
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining
6
+ # a copy of this software and associated documentation files (the "Soft-
7
+ # ware"), to deal in the Software without restriction, including without
8
+ # limitation the rights to use, copy, modify, merge, publish, distribute,
9
+ # sublicense, and/or sell copies of the Software, and to permit persons to
10
+ # whom the Software is furnished to do so, subject to the following condi-
11
+ # tions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included
14
+ # in all copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17
+ # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABI-
18
+ # LITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
19
+ # SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
20
+ # OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ # OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ import argparse
25
+ import errno
26
+ import sys
27
+
28
+ from lxml import etree
29
+ from . import NAME, VERSION, DESCRIPTION
30
+ from .transform import to_concept, to_reference, to_task, to_task_generated
31
+
32
+ # Print a message to standard error output and terminate the script:
33
+ def exit_with_error(error_message, exit_status=errno.EPERM):
34
+ # Print the supplied message to standard error output:
35
+ print(f'{NAME}: {error_message}', file=sys.stderr)
36
+
37
+ # Terminate the script with the supplied exit status:
38
+ sys.exit(exit_status)
39
+
40
+ # Convert the selected file:
41
+ def convert(source_file, target_type):
42
+ # Select the appropriate XSLT transformer:
43
+ transform = {
44
+ 'concept': to_concept,
45
+ 'reference': to_reference,
46
+ 'task': to_task,
47
+ 'task-gen': to_task_generated,
48
+ }[target_type]
49
+
50
+ try:
51
+ # Run the transformation:
52
+ xml = transform(etree.parse(source_file))
53
+ except Exception as ex:
54
+ # Terminate the script if an error is encountered:
55
+ exit_with_error(f'{source_file}: {ex}')
56
+
57
+ # Print any warning messages to standard error output:
58
+ for error in transform.error_log:
59
+ print(f'{source_file}: {error.message}', file=sys.stderr)
60
+
61
+ # Return the result:
62
+ return xml
63
+
64
+ # Parse supplied command-line options:
65
+ def parse_args():
66
+ # Configure the option parser:
67
+ parser = argparse.ArgumentParser(prog=NAME,
68
+ description=DESCRIPTION,
69
+ add_help=False)
70
+
71
+ # Redefine section titles for the main command:
72
+ parser._optionals.title = 'Options'
73
+ parser._positionals.title = 'Arguments'
74
+
75
+ # Add supported command-line options:
76
+ info = parser.add_mutually_exclusive_group()
77
+ info.add_argument('-h', '--help',
78
+ action='help',
79
+ help='display this help and exit')
80
+ info.add_argument('-v', '--version',
81
+ action='version',
82
+ version=f'{NAME} {VERSION}',
83
+ help='display version information and exit')
84
+ parser.add_argument('-t', '--type',
85
+ choices=('concept', 'reference', 'task', 'task-gen'),
86
+ required=True,
87
+ help='target DITA content type')
88
+ parser.add_argument('-o', '--output',
89
+ default=sys.stdout,
90
+ help='write output to the selected file instead of stdout')
91
+
92
+ # Add supported command-line arguments:
93
+ parser.add_argument('file', metavar='FILE',
94
+ help='specify the DITA topic file to convert')
95
+
96
+ # Parse the command-line options:
97
+ args = parser.parse_args()
98
+
99
+ # Convert the selected file:
100
+ xml = convert(args.file, args.type)
101
+
102
+ # Determine whether to write to standard output:
103
+ if args.output == sys.stdout:
104
+ # Print to standard output:
105
+ sys.stdout.write(str(xml))
106
+
107
+ # Terminate the script:
108
+ sys.exit(0)
109
+
110
+ try:
111
+ # Write to the selected file:
112
+ with open(args.output, 'w') as f:
113
+ f.write(str(xml))
114
+ except Exception as ex:
115
+ # Terminate the script if an error is encountered:
116
+ exit_with_error(f'{args.output}: {ex}')
@@ -0,0 +1,34 @@
1
+ # Copyright (C) 2024 Jaromir Hradilek
2
+
3
+ # MIT License
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining
6
+ # a copy of this software and associated documentation files (the "Soft-
7
+ # ware"), to deal in the Software without restriction, including without
8
+ # limitation the rights to use, copy, modify, merge, publish, distribute,
9
+ # sublicense, and/or sell copies of the Software, and to permit persons to
10
+ # whom the Software is furnished to do so, subject to the following condi-
11
+ # tions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included
14
+ # in all copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17
+ # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABI-
18
+ # LITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
19
+ # SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
20
+ # OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ # OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ from lxml import etree
25
+ from .xslt import *
26
+
27
+ # Define which symbols are to be exported:
28
+ __all__ = ['to_concept', 'to_reference', 'to_task', 'to_task_generated' ]
29
+
30
+ # Expose the XSLT transformers:
31
+ to_concept = etree.XSLT(etree.parse(concept))
32
+ to_reference = etree.XSLT(etree.parse(reference))
33
+ to_task = etree.XSLT(etree.parse(task))
34
+ to_task_generated = etree.XSLT(etree.parse(task_generated))
@@ -0,0 +1,68 @@
1
+ <?xml version='1.0' encoding='utf-8' ?>
2
+
3
+ <!--
4
+ Copyright (C) 2024 Jaromir Hradilek
5
+
6
+ A custom XSLT stylesheet to convert a generic DITA topic to a specialized
7
+ DITA concept topic.
8
+
9
+ Usage: xsltproc ––novalid concept.xsl YOUR_TOPIC.dita
10
+
11
+ MIT License
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining
14
+ a copy of this software and associated documentation files (the "Soft-
15
+ ware"), to deal in the Software without restriction, including without
16
+ limitation the rights to use, copy, modify, merge, publish, distribute,
17
+ sublicense, and/or sell copies of the Software, and to permit persons to
18
+ whom the Software is furnished to do so, subject to the following condi-
19
+ tions:
20
+
21
+ The above copyright notice and this permission notice shall be included
22
+ in all copies or substantial portions of the Software.
23
+
24
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABI-
26
+ LITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
27
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
28
+ OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
29
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
30
+ OTHER DEALINGS IN THE SOFTWARE.
31
+ -->
32
+
33
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
34
+ <!-- Compose the XML and DOCTYPE declarations: -->
35
+ <xsl:output encoding="utf-8" method="xml" doctype-system="concept.dtd" doctype-public="-//OASIS//DTD DITA Concept//EN" />
36
+
37
+ <!-- Format the XML output: -->
38
+ <xsl:output indent="yes" />
39
+ <xsl:strip-space elements="*" />
40
+ <xsl:preserve-space elements="codeblock pre screen" />
41
+
42
+ <!-- Report an error if the converted file is not a DITA topic: -->
43
+ <xsl:template match="/*[not(self::topic)]">
44
+ <xsl:message terminate="yes">ERROR: Not a DITA topic</xsl:message>
45
+ </xsl:template>
46
+
47
+ <!-- Perform identity transformation: -->
48
+ <xsl:template match="@*|node()">
49
+ <xsl:copy>
50
+ <xsl:apply-templates select="@*|node()" />
51
+ </xsl:copy>
52
+ </xsl:template>
53
+
54
+ <!-- Transform the root element: -->
55
+ <xsl:template match="/topic">
56
+ <xsl:element name="concept">
57
+ <xsl:apply-templates select="@*|node()" />
58
+ </xsl:element>
59
+ </xsl:template>
60
+
61
+ <!-- Transform the body element: -->
62
+ <xsl:template match="body">
63
+ <xsl:element name="conbody">
64
+ <xsl:apply-templates select="@*|node()" />
65
+ </xsl:element>
66
+ </xsl:template>
67
+
68
+ </xsl:stylesheet>
@@ -0,0 +1,80 @@
1
+ <?xml version='1.0' encoding='utf-8' ?>
2
+
3
+ <!--
4
+ Copyright (C) 2024 Jaromir Hradilek
5
+
6
+ A custom XSLT stylesheet to convert a generic DITA topic to a specialized
7
+ DITA reference topic.
8
+
9
+ Usage: xsltproc ––novalid reference.xsl YOUR_TOPIC.dita
10
+
11
+ MIT License
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining
14
+ a copy of this software and associated documentation files (the "Soft-
15
+ ware"), to deal in the Software without restriction, including without
16
+ limitation the rights to use, copy, modify, merge, publish, distribute,
17
+ sublicense, and/or sell copies of the Software, and to permit persons to
18
+ whom the Software is furnished to do so, subject to the following condi-
19
+ tions:
20
+
21
+ The above copyright notice and this permission notice shall be included
22
+ in all copies or substantial portions of the Software.
23
+
24
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABI-
26
+ LITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
27
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
28
+ OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
29
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
30
+ OTHER DEALINGS IN THE SOFTWARE.
31
+ -->
32
+
33
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
34
+ <!-- Compose the XML and DOCTYPE declarations: -->
35
+ <xsl:output encoding="utf-8" method="xml" doctype-system="reference.dtd" doctype-public="-//OASIS//DTD DITA Reference//EN" />
36
+
37
+ <!-- Format the XML output: -->
38
+ <xsl:output indent="yes" />
39
+ <xsl:strip-space elements="*" />
40
+ <xsl:preserve-space elements="codeblock pre screen" />
41
+
42
+ <!-- Report an error if the converted file is not a DITA topic: -->
43
+ <xsl:template match="/*[not(self::topic)]">
44
+ <xsl:message terminate="yes">ERROR: Not a DITA topic</xsl:message>
45
+ </xsl:template>
46
+
47
+ <!-- Perform identity transformation: -->
48
+ <xsl:template match="@*|node()">
49
+ <xsl:copy>
50
+ <xsl:apply-templates select="@*|node()" />
51
+ </xsl:copy>
52
+ </xsl:template>
53
+
54
+ <!-- Transform the root element: -->
55
+ <xsl:template match="/topic">
56
+ <xsl:element name="reference">
57
+ <xsl:apply-templates select="@*|node()" />
58
+ </xsl:element>
59
+ </xsl:template>
60
+
61
+ <!-- Transform the body element: -->
62
+ <xsl:template match="body">
63
+ <xsl:element name="refbody">
64
+ <xsl:choose>
65
+ <xsl:when test="section">
66
+ <xsl:element name="section">
67
+ <xsl:apply-templates select="section[1]/preceding-sibling::*" />
68
+ </xsl:element>
69
+ <xsl:apply-templates select="section|section/following-sibling::*" />
70
+ </xsl:when>
71
+ <xsl:otherwise>
72
+ <xsl:element name="section">
73
+ <xsl:apply-templates select="@*|node()" />
74
+ </xsl:element>
75
+ </xsl:otherwise>
76
+ </xsl:choose>
77
+ </xsl:element>
78
+ </xsl:template>
79
+
80
+ </xsl:stylesheet>
@@ -0,0 +1,281 @@
1
+ <?xml version='1.0' encoding='utf-8' ?>
2
+
3
+ <!--
4
+ Copyright (C) 2024 Jaromir Hradilek
5
+
6
+ A custom XSLT stylesheet to convert a generic DITA topic generated with
7
+ the asciidoctor-dita-topic[1] plug-in to a specialized DITA task topic.
8
+ The stylesheet expects that the original AsciiDoc file has followed the
9
+ guidelines for procedure modules as defined in the Modular Documentation
10
+ Reference Guide[2].
11
+
12
+ Usage: xsltproc ––novalid task-generated.xsl YOUR_TOPIC.dita
13
+
14
+ [1] https://github.com/jhradilek/asciidoctor-dita-topic
15
+ [2] https://redhat-documentation.github.io/modular-docs/
16
+
17
+ MIT License
18
+
19
+ Permission is hereby granted, free of charge, to any person obtaining
20
+ a copy of this software and associated documentation files (the "Soft-
21
+ ware"), to deal in the Software without restriction, including without
22
+ limitation the rights to use, copy, modify, merge, publish, distribute,
23
+ sublicense, and/or sell copies of the Software, and to permit persons to
24
+ whom the Software is furnished to do so, subject to the following condi-
25
+ tions:
26
+
27
+ The above copyright notice and this permission notice shall be included
28
+ in all copies or substantial portions of the Software.
29
+
30
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
31
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABI-
32
+ LITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
33
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
34
+ OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
35
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
36
+ OTHER DEALINGS IN THE SOFTWARE.
37
+ -->
38
+
39
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
40
+ <!-- Compose the XML and DOCTYPE declarations: -->
41
+ <xsl:output encoding="utf-8" method="xml" doctype-system="task.dtd" doctype-public="-//OASIS//DTD DITA Task//EN" />
42
+
43
+ <!-- Format the XML output: -->
44
+ <xsl:output indent="yes" />
45
+ <xsl:strip-space elements="*" />
46
+ <xsl:preserve-space elements="codeblock pre screen" />
47
+
48
+ <!-- Report an error if the converted file is not a DITA topic: -->
49
+ <xsl:template match="/*[not(self::topic)]">
50
+ <xsl:message terminate="yes">ERROR: Not a DITA topic</xsl:message>
51
+ </xsl:template>
52
+
53
+ <!-- Report an error if the converted file contains a section: -->
54
+ <xsl:template match="//section">
55
+ <xsl:message terminate="yes">ERROR: Section not allowed in a DITA task</xsl:message>
56
+ </xsl:template>
57
+
58
+ <!-- Define a list of valid cmd element children: -->
59
+ <xsl:variable name="cmd-children" select="' abbreviated-form apiname b boolean cite cmdname codeph data data-about draft-comment equation-inline filepath fn foreign i image indexterm indextermref keyword line-through markupname mathml menucascade msgnum msgph numcharref option overline parameterentity parmname ph q required-cleanup sort-as state sub sup svg-container synph systemoutput term text textentity tm tt u uicontrol unknown userinput varname wintitle xmlatt xmlelement xmlnsname xmlpi xref '" />
60
+
61
+ <!-- Perform identity transformation: -->
62
+ <xsl:template match="@*|node()">
63
+ <xsl:copy>
64
+ <xsl:apply-templates select="@*|node()" />
65
+ </xsl:copy>
66
+ </xsl:template>
67
+
68
+ <!-- Transform the root element: -->
69
+ <xsl:template match="/topic">
70
+ <xsl:element name="task">
71
+ <xsl:apply-templates select="@*|node()" />
72
+ </xsl:element>
73
+ </xsl:template>
74
+
75
+ <!-- Transform the body element: -->
76
+ <xsl:template match="body">
77
+ <xsl:element name="taskbody">
78
+ <!-- Compose the prereq element: -->
79
+ <xsl:call-template name="compose-element">
80
+ <xsl:with-param name="name" select="'prereq'" />
81
+ <xsl:with-param name="contents" select="*[not(@outputclass='title') and preceding-sibling::p[@outputclass='title'][1][b='Prerequisites']]" />
82
+ </xsl:call-template>
83
+ <!-- Compose the context element: -->
84
+ <xsl:choose>
85
+ <xsl:when test="p[@outputclass='title']">
86
+ <xsl:call-template name="compose-element">
87
+ <xsl:with-param name="name" select="'context'" />
88
+ <xsl:with-param name="contents" select="p[@outputclass='title'][1]/preceding-sibling::*" />
89
+ </xsl:call-template>
90
+ </xsl:when>
91
+ <xsl:otherwise>
92
+ <xsl:call-template name="compose-element">
93
+ <xsl:with-param name="name" select="'context'" />
94
+ <xsl:with-param name="contents" select="*" />
95
+ </xsl:call-template>
96
+ </xsl:otherwise>
97
+ </xsl:choose>
98
+ <!-- Compose the steps element: -->
99
+ <xsl:call-template name="steps">
100
+ <xsl:with-param name="contents" select="*[not(@outputclass='title') and preceding-sibling::p[@outputclass='title'][1][b='Procedure']]" />
101
+ </xsl:call-template>
102
+ <!-- Compose the result element: -->
103
+ <xsl:call-template name="compose-element">
104
+ <xsl:with-param name="name" select="'result'" />
105
+ <xsl:with-param name="contents" select="*[not(@outputclass='title') and preceding-sibling::p[@outputclass='title'][1][b='Verification']]" />
106
+ </xsl:call-template>
107
+ <!-- Compose the tasktroubleshooting element: -->
108
+ <xsl:call-template name="compose-element">
109
+ <xsl:with-param name="name" select="'tasktroubleshooting'" />
110
+ <xsl:with-param name="contents" select="*[not(@outputclass='title') and preceding-sibling::p[@outputclass='title'][1][b='Troubleshooting' or b='Troubleshooting steps']]" />
111
+ </xsl:call-template>
112
+ <!-- Compose the postreq element: -->
113
+ <xsl:call-template name="compose-element">
114
+ <xsl:with-param name="name" select="'postreq'" />
115
+ <xsl:with-param name="contents" select="*[not(@outputclass='title') and preceding-sibling::p[@outputclass='title'][1][b='Next steps' or b='Next step']]" />
116
+ </xsl:call-template>
117
+ <!-- Issue a warning if the converted file contains an unsupported title: -->
118
+ <xsl:for-each select="p[@outputclass='title']/b/text()">
119
+ <xsl:variable name="titles" select="'|Prerequisites|Procedure|Verification|Troubleshooting|Troubleshooting steps|Next steps|Next step|'" />
120
+ <xsl:if test="not(contains($titles, concat('|', ., '|')))">
121
+ <xsl:message terminate="no">WARNING: Unsupported title '<xsl:copy-of select="." />' found, skipping...</xsl:message>
122
+ </xsl:if>
123
+ </xsl:for-each>
124
+ </xsl:element>
125
+ </xsl:template>
126
+
127
+ <!-- Compose the steps element: -->
128
+ <xsl:template name="steps">
129
+ <xsl:param name="contents" />
130
+ <xsl:variable name="list" select="$contents[self::ol or self::ul][1]" />
131
+ <xsl:if test="$contents">
132
+ <xsl:if test="$contents[not(self::ol or self::ul)]">
133
+ <xsl:message terminate="no">WARNING: Non-list elements found in steps, skipping...</xsl:message>
134
+ </xsl:if>
135
+ <xsl:if test="$contents[self::ol or self::ul][2]">
136
+ <xsl:message terminate="no">WARNING: Extra list elements found in steps, skipping...</xsl:message>
137
+ </xsl:if>
138
+ <xsl:if test="not($list)">
139
+ <xsl:message terminate="no">WARNING: No list elementes found in steps</xsl:message>
140
+ </xsl:if>
141
+ <xsl:if test="$list">
142
+ <xsl:variable name="name">
143
+ <xsl:choose>
144
+ <xsl:when test="$list[self::ul]">
145
+ <xsl:text>steps-unordered</xsl:text>
146
+ </xsl:when>
147
+ <xsl:otherwise>
148
+ <xsl:text>steps</xsl:text>
149
+ </xsl:otherwise>
150
+ </xsl:choose>
151
+ </xsl:variable>
152
+ <xsl:element name="{$name}">
153
+ <xsl:for-each select="$list/li">
154
+ <xsl:call-template name="step-substep">
155
+ <xsl:with-param name="type" select="'step'" />
156
+ </xsl:call-template>
157
+ </xsl:for-each>
158
+ </xsl:element>
159
+ </xsl:if>
160
+ </xsl:if>
161
+ </xsl:template>
162
+
163
+ <!-- Compose the step/substep element: -->
164
+ <xsl:template name="step-substep">
165
+ <xsl:param name="type" />
166
+ <xsl:element name="{$type}">
167
+ <xsl:choose>
168
+ <xsl:when test="text()">
169
+ <xsl:variable name="info-element" select="*[not(contains($cmd-children, concat(' ', name(), ' ')))][1]" />
170
+ <xsl:choose>
171
+ <xsl:when test="$info-element">
172
+ <xsl:call-template name="compose-element">
173
+ <xsl:with-param name="name" select="'cmd'" />
174
+ <xsl:with-param name="contents" select="$info-element/preceding-sibling::*|$info-element/preceding-sibling::text()" />
175
+ </xsl:call-template>
176
+ <xsl:call-template name="info">
177
+ <xsl:with-param name="parent" select="$type" />
178
+ <xsl:with-param name="contents" select="$info-element|$info-element/following-sibling::*|$info-element/following-sibling::text()" />
179
+ </xsl:call-template>
180
+ </xsl:when>
181
+ <xsl:otherwise>
182
+ <xsl:call-template name="compose-element">
183
+ <xsl:with-param name="name" select="'cmd'" />
184
+ <xsl:with-param name="contents" select="text()|*" />
185
+ </xsl:call-template>
186
+ </xsl:otherwise>
187
+ </xsl:choose>
188
+ </xsl:when>
189
+ <xsl:otherwise>
190
+ <xsl:call-template name="compose-element">
191
+ <xsl:with-param name="name" select="'cmd'" />
192
+ <xsl:with-param name="contents" select="*[1]/text()|*[1]/*" />
193
+ </xsl:call-template>
194
+ <xsl:if test="*[2]">
195
+ <xsl:call-template name="info">
196
+ <xsl:with-param name="parent" select="$type" />
197
+ <xsl:with-param name="contents" select="*[position() > 1]" />
198
+ </xsl:call-template>
199
+ </xsl:if>
200
+ </xsl:otherwise>
201
+ </xsl:choose>
202
+ </xsl:element>
203
+ </xsl:template>
204
+
205
+ <!-- Compose the info element: -->
206
+ <xsl:template name="info">
207
+ <xsl:param name="parent" />
208
+ <xsl:param name="contents" />
209
+ <xsl:choose>
210
+ <xsl:when test="$parent = 'step'">
211
+ <xsl:call-template name="info-substeps">
212
+ <xsl:with-param name="contents" select="$contents" />
213
+ </xsl:call-template>
214
+ </xsl:when>
215
+ <xsl:otherwise>
216
+ <xsl:call-template name="compose-element">
217
+ <xsl:with-param name="name" select="'info'" />
218
+ <xsl:with-param name="contents" select="$contents" />
219
+ </xsl:call-template>
220
+ </xsl:otherwise>
221
+ </xsl:choose>
222
+ </xsl:template>
223
+
224
+ <!-- Compose alternating info/substeps elements: -->
225
+ <xsl:template name="info-substeps">
226
+ <xsl:param name="contents" />
227
+ <xsl:variable name="substeps-count" select="count($contents[self::ol])" />
228
+ <xsl:variable name="first-info" select="$contents[following-sibling::ol[$substeps-count]]" />
229
+ <xsl:if test="$substeps-count = 0">
230
+ <xsl:call-template name="compose-element">
231
+ <xsl:with-param name="name" select="'info'" />
232
+ <xsl:with-param name="contents" select="$contents" />
233
+ </xsl:call-template>
234
+ </xsl:if>
235
+ <xsl:if test="$first-info">
236
+ <xsl:call-template name="compose-element">
237
+ <xsl:with-param name="name" select="'info'" />
238
+ <xsl:with-param name="contents" select="$first-info" />
239
+ </xsl:call-template>
240
+ </xsl:if>
241
+ <xsl:for-each select="$contents[self::ol]">
242
+ <xsl:variable name="current-position" select="position()" />
243
+ <xsl:element name="substeps">
244
+ <xsl:for-each select="li">
245
+ <xsl:call-template name="step-substep">
246
+ <xsl:with-param name="type" select="'substep'" />
247
+ </xsl:call-template>
248
+ </xsl:for-each>
249
+ </xsl:element>
250
+ <xsl:choose>
251
+ <xsl:when test="following-sibling::ol">
252
+ <xsl:call-template name="compose-element">
253
+ <xsl:with-param name="name" select="'info'" />
254
+ <xsl:with-param name="contents" select="following-sibling::*[following-sibling::ol[$substeps-count - $current-position]]" />
255
+ </xsl:call-template>
256
+ </xsl:when>
257
+ <xsl:otherwise>
258
+ <xsl:variable name="last-info" select="following-sibling::*|following-sibling::text()" />
259
+ <xsl:if test="$last-info">
260
+ <xsl:call-template name="compose-element">
261
+ <xsl:with-param name="name" select="'info'" />
262
+ <xsl:with-param name="contents" select="$last-info" />
263
+ </xsl:call-template>
264
+ </xsl:if>
265
+ </xsl:otherwise>
266
+ </xsl:choose>
267
+ </xsl:for-each>
268
+ </xsl:template>
269
+
270
+ <!-- Helper: Compose an element with the given name and contents: -->
271
+ <xsl:template name="compose-element">
272
+ <xsl:param name="name" />
273
+ <xsl:param name="contents" />
274
+ <xsl:if test="$contents">
275
+ <xsl:element name="{$name}">
276
+ <xsl:apply-templates select="$contents" />
277
+ </xsl:element>
278
+ </xsl:if>
279
+ </xsl:template>
280
+
281
+ </xsl:stylesheet>
@@ -0,0 +1,255 @@
1
+ <?xml version='1.0' encoding='utf-8' ?>
2
+
3
+ <!--
4
+ Copyright (C) 2024 Jaromir Hradilek
5
+
6
+ A custom XSLT stylesheet to convert a generic DITA topic to a specialized
7
+ DITA task topic:
8
+
9
+ 1. Any contents preceding the first ordered list is considered part of
10
+ the <context> element.
11
+ 2. The first ordered list is transformed into <steps>.
12
+ 3. Any contents following the first ordered list is considered part of
13
+ the <result> element.
14
+
15
+ Sections are not permitted and will result in an error.
16
+
17
+ Usage: xsltproc ––novalid task.xsl YOUR_TOPIC.dita
18
+
19
+ MIT License
20
+
21
+ Permission is hereby granted, free of charge, to any person obtaining
22
+ a copy of this software and associated documentation files (the "Soft-
23
+ ware"), to deal in the Software without restriction, including without
24
+ limitation the rights to use, copy, modify, merge, publish, distribute,
25
+ sublicense, and/or sell copies of the Software, and to permit persons to
26
+ whom the Software is furnished to do so, subject to the following condi-
27
+ tions:
28
+
29
+ The above copyright notice and this permission notice shall be included
30
+ in all copies or substantial portions of the Software.
31
+
32
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
33
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABI-
34
+ LITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
35
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
36
+ OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
37
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
38
+ OTHER DEALINGS IN THE SOFTWARE.
39
+ -->
40
+
41
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
42
+ <!-- Compose the XML and DOCTYPE declarations: -->
43
+ <xsl:output encoding="utf-8" method="xml" doctype-system="task.dtd" doctype-public="-//OASIS//DTD DITA Task//EN" />
44
+
45
+ <!-- Format the XML output: -->
46
+ <xsl:output indent="yes" />
47
+ <xsl:strip-space elements="*" />
48
+ <xsl:preserve-space elements="codeblock pre screen" />
49
+
50
+ <!-- Report an error if the converted file is not a DITA topic: -->
51
+ <xsl:template match="/*[not(self::topic)]">
52
+ <xsl:message terminate="yes">ERROR: Not a DITA topic</xsl:message>
53
+ </xsl:template>
54
+
55
+ <!-- Report an error if the converted file contains a section: -->
56
+ <xsl:template match="//section">
57
+ <xsl:message terminate="yes">ERROR: Section not allowed in a DITA task</xsl:message>
58
+ </xsl:template>
59
+
60
+ <!-- Define a list of valid cmd element children: -->
61
+ <xsl:variable name="cmd-children" select="' abbreviated-form apiname b boolean cite cmdname codeph data data-about draft-comment equation-inline filepath fn foreign i image indexterm indextermref keyword line-through markupname mathml menucascade msgnum msgph numcharref option overline parameterentity parmname ph q required-cleanup sort-as state sub sup svg-container synph systemoutput term text textentity tm tt u uicontrol unknown userinput varname wintitle xmlatt xmlelement xmlnsname xmlpi xref '" />
62
+
63
+ <!-- Perform identity transformation: -->
64
+ <xsl:template match="@*|node()">
65
+ <xsl:copy>
66
+ <xsl:apply-templates select="@*|node()" />
67
+ </xsl:copy>
68
+ </xsl:template>
69
+
70
+ <!-- Transform the root element: -->
71
+ <xsl:template match="/topic">
72
+ <xsl:element name="task">
73
+ <xsl:apply-templates select="@*|node()" />
74
+ </xsl:element>
75
+ </xsl:template>
76
+
77
+ <!-- Transform the body element: -->
78
+ <xsl:template match="body">
79
+ <xsl:element name="taskbody">
80
+ <xsl:variable name="steps" select="ol[1]" />
81
+ <xsl:call-template name="context">
82
+ <xsl:with-param name="steps" select="$steps" />
83
+ </xsl:call-template>
84
+ <xsl:call-template name="steps">
85
+ <xsl:with-param name="steps" select="$steps" />
86
+ </xsl:call-template>
87
+ <xsl:call-template name="result">
88
+ <xsl:with-param name="steps" select="$steps" />
89
+ </xsl:call-template>
90
+ </xsl:element>
91
+ </xsl:template>
92
+
93
+ <!-- Compose the context element: -->
94
+ <xsl:template name="context">
95
+ <xsl:param name="steps" />
96
+ <xsl:choose>
97
+ <xsl:when test="$steps">
98
+ <xsl:call-template name="compose-element">
99
+ <xsl:with-param name="name" select="'context'" />
100
+ <xsl:with-param name="contents" select="ol[1]/preceding-sibling::*" />
101
+ </xsl:call-template>
102
+ </xsl:when>
103
+ <xsl:otherwise>
104
+ <xsl:call-template name="compose-element">
105
+ <xsl:with-param name="name" select="'context'" />
106
+ <xsl:with-param name="contents" select="*" />
107
+ </xsl:call-template>
108
+ </xsl:otherwise>
109
+ </xsl:choose>
110
+ </xsl:template>
111
+
112
+ <!-- Compose the steps element: -->
113
+ <xsl:template name="steps">
114
+ <xsl:param name="steps" />
115
+ <xsl:if test="$steps">
116
+ <xsl:element name="steps">
117
+ <xsl:for-each select="$steps/li">
118
+ <xsl:call-template name="step-substep">
119
+ <xsl:with-param name="type" select="'step'" />
120
+ </xsl:call-template>
121
+ </xsl:for-each>
122
+ </xsl:element>
123
+ </xsl:if>
124
+ </xsl:template>
125
+
126
+ <!-- Compose the result element: -->
127
+ <xsl:template name="result">
128
+ <xsl:param name="steps" />
129
+ <xsl:if test="$steps">
130
+ <xsl:call-template name="compose-element">
131
+ <xsl:with-param name="name" select="'result'" />
132
+ <xsl:with-param name="contents" select="ol[1]/following-sibling::*" />
133
+ </xsl:call-template>
134
+ </xsl:if>
135
+ </xsl:template>
136
+
137
+ <!-- Compose the step/substep element: -->
138
+ <xsl:template name="step-substep">
139
+ <xsl:param name="type" />
140
+ <xsl:element name="{$type}">
141
+ <xsl:choose>
142
+ <xsl:when test="text()">
143
+ <xsl:variable name="info-element" select="*[not(contains($cmd-children, concat(' ', name(), ' ')))][1]" />
144
+ <xsl:choose>
145
+ <xsl:when test="$info-element">
146
+ <xsl:call-template name="compose-element">
147
+ <xsl:with-param name="name" select="'cmd'" />
148
+ <xsl:with-param name="contents" select="$info-element/preceding-sibling::*|$info-element/preceding-sibling::text()" />
149
+ </xsl:call-template>
150
+ <xsl:call-template name="info">
151
+ <xsl:with-param name="parent" select="$type" />
152
+ <xsl:with-param name="contents" select="$info-element|$info-element/following-sibling::*|$info-element/following-sibling::text()" />
153
+ </xsl:call-template>
154
+ </xsl:when>
155
+ <xsl:otherwise>
156
+ <xsl:call-template name="compose-element">
157
+ <xsl:with-param name="name" select="'cmd'" />
158
+ <xsl:with-param name="contents" select="text()|*" />
159
+ </xsl:call-template>
160
+ </xsl:otherwise>
161
+ </xsl:choose>
162
+ </xsl:when>
163
+ <xsl:otherwise>
164
+ <xsl:call-template name="compose-element">
165
+ <xsl:with-param name="name" select="'cmd'" />
166
+ <xsl:with-param name="contents" select="*[1]/text()|*[1]/*" />
167
+ </xsl:call-template>
168
+ <xsl:if test="*[2]">
169
+ <xsl:call-template name="info">
170
+ <xsl:with-param name="parent" select="$type" />
171
+ <xsl:with-param name="contents" select="*[position() > 1]" />
172
+ </xsl:call-template>
173
+ </xsl:if>
174
+ </xsl:otherwise>
175
+ </xsl:choose>
176
+ </xsl:element>
177
+ </xsl:template>
178
+
179
+ <!-- Compose the info element: -->
180
+ <xsl:template name="info">
181
+ <xsl:param name="parent" />
182
+ <xsl:param name="contents" />
183
+ <xsl:choose>
184
+ <xsl:when test="$parent = 'step'">
185
+ <xsl:call-template name="info-substeps">
186
+ <xsl:with-param name="contents" select="$contents" />
187
+ </xsl:call-template>
188
+ </xsl:when>
189
+ <xsl:otherwise>
190
+ <xsl:call-template name="compose-element">
191
+ <xsl:with-param name="name" select="'info'" />
192
+ <xsl:with-param name="contents" select="$contents" />
193
+ </xsl:call-template>
194
+ </xsl:otherwise>
195
+ </xsl:choose>
196
+ </xsl:template>
197
+
198
+ <!-- Compose alternating info/substeps elements: -->
199
+ <xsl:template name="info-substeps">
200
+ <xsl:param name="contents" />
201
+ <xsl:variable name="substeps-count" select="count($contents[self::ol])" />
202
+ <xsl:variable name="first-info" select="$contents[following-sibling::ol[$substeps-count]]" />
203
+ <xsl:if test="$substeps-count = 0">
204
+ <xsl:call-template name="compose-element">
205
+ <xsl:with-param name="name" select="'info'" />
206
+ <xsl:with-param name="contents" select="$contents" />
207
+ </xsl:call-template>
208
+ </xsl:if>
209
+ <xsl:if test="$first-info">
210
+ <xsl:call-template name="compose-element">
211
+ <xsl:with-param name="name" select="'info'" />
212
+ <xsl:with-param name="contents" select="$first-info" />
213
+ </xsl:call-template>
214
+ </xsl:if>
215
+ <xsl:for-each select="$contents[self::ol]">
216
+ <xsl:variable name="current-position" select="position()" />
217
+ <xsl:element name="substeps">
218
+ <xsl:for-each select="li">
219
+ <xsl:call-template name="step-substep">
220
+ <xsl:with-param name="type" select="'substep'" />
221
+ </xsl:call-template>
222
+ </xsl:for-each>
223
+ </xsl:element>
224
+ <xsl:choose>
225
+ <xsl:when test="following-sibling::ol">
226
+ <xsl:call-template name="compose-element">
227
+ <xsl:with-param name="name" select="'info'" />
228
+ <xsl:with-param name="contents" select="following-sibling::*[following-sibling::ol[$substeps-count - $current-position]]" />
229
+ </xsl:call-template>
230
+ </xsl:when>
231
+ <xsl:otherwise>
232
+ <xsl:variable name="last-info" select="following-sibling::*|following-sibling::text()" />
233
+ <xsl:if test="$last-info">
234
+ <xsl:call-template name="compose-element">
235
+ <xsl:with-param name="name" select="'info'" />
236
+ <xsl:with-param name="contents" select="$last-info" />
237
+ </xsl:call-template>
238
+ </xsl:if>
239
+ </xsl:otherwise>
240
+ </xsl:choose>
241
+ </xsl:for-each>
242
+ </xsl:template>
243
+
244
+ <!-- Helper: Compose an element with the given name and contents: -->
245
+ <xsl:template name="compose-element">
246
+ <xsl:param name="name" />
247
+ <xsl:param name="contents" />
248
+ <xsl:if test="$contents">
249
+ <xsl:element name="{$name}">
250
+ <xsl:apply-templates select="$contents" />
251
+ </xsl:element>
252
+ </xsl:if>
253
+ </xsl:template>
254
+
255
+ </xsl:stylesheet>
dita/convert/xslt.py ADDED
@@ -0,0 +1,33 @@
1
+ # Copyright (C) 2024 Jaromir Hradilek
2
+
3
+ # MIT License
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining
6
+ # a copy of this software and associated documentation files (the "Soft-
7
+ # ware"), to deal in the Software without restriction, including without
8
+ # limitation the rights to use, copy, modify, merge, publish, distribute,
9
+ # sublicense, and/or sell copies of the Software, and to permit persons to
10
+ # whom the Software is furnished to do so, subject to the following condi-
11
+ # tions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included
14
+ # in all copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17
+ # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABI-
18
+ # LITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
19
+ # SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
20
+ # OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ # OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ from pathlib import Path
25
+
26
+ # Define which symbols are to be exported:
27
+ __all__ = ['concept', 'reference', 'task', 'task_generated' ]
28
+
29
+ # XSLT file paths:
30
+ concept = Path(__file__).parent / 'xslt/concept.xsl'
31
+ reference = Path(__file__).parent / 'xslt/reference.xsl'
32
+ task = Path(__file__).parent / 'xslt/task.xsl'
33
+ task_generated = Path(__file__).parent / 'xslt/task-generated.xsl'
@@ -0,0 +1,21 @@
1
+ Copyright (C) 2024 Jaromir Hradilek
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a
6
+ copy of this software and associated documentation files (the "Software"),
7
+ to deal in the Software without restriction, including without limitation
8
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
9
+ and/or sell copies of the Software, and to permit persons to whom the
10
+ Software is furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
+ DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,19 @@
1
+ Metadata-Version: 2.1
2
+ Name: dita-convert
3
+ Version: 1.0.0
4
+ Summary: Convert a generic DITA topic to a specialized concept, task, or reference.
5
+ Author-email: Jaromir Hradilek <jhradilek@gmail.com>
6
+ Project-URL: Homepage, https://github.com/jhradilek/dita-custom-xslt
7
+ Project-URL: Repository, https://github.com/jhradilek/dita-custom-xslt
8
+ Project-URL: Issues, https://github.com/jhradilek/dita-custom-xslt/issues
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Topic :: Documentation
16
+ Requires-Python: >=3.10
17
+ License-File: LICENSE
18
+ Requires-Dist: lxml >=4.9.2
19
+
@@ -0,0 +1,16 @@
1
+ dita/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ dita/convert/__init__.py,sha256=fHAajA4TJxTH5fOA-0DpEGbf341hXGPM-odHeCg0eEE,1552
3
+ dita/convert/__main__.py,sha256=wSZ4tvdFNJdMR-QvkIOGcIAfGhJxdug_2AFT4ZDoRWc,1215
4
+ dita/convert/cli.py,sha256=ZN4B5-n2tgUvF6T50noHC1WTESbiEjsjmLY94ihK6gY,4135
5
+ dita/convert/transform.py,sha256=L2wzDkxJpOEQjco5dS-vc82UcqutGynd-vEijwXpvYw,1560
6
+ dita/convert/xslt.py,sha256=FwblAeb288PG3gNT1kSjQNhyqcsBpa2xNLWgcdzqMnM,1545
7
+ dita/convert/xslt/concept.xsl,sha256=6d_JvtQvt47xlmoGulo2_4D35n2Pyu_jdsAMDg-juNE,2552
8
+ dita/convert/xslt/reference.xsl,sha256=DuFIF6WYmeKN7CLx2RpCPBI-QkREaiN1SZdw2jL0waU,2995
9
+ dita/convert/xslt/task-generated.xsl,sha256=d7xYIqwR8cOEj9GRLRrue08GutNOvU65CPBt66Sp_CM,12728
10
+ dita/convert/xslt/task.xsl,sha256=X0Vw1CDSpzRB04Yi8J3sYIf6x3Q1n_CT_EhA9s7_aW0,10375
11
+ dita_convert-1.0.0.dist-info/LICENSE,sha256=FMHDtn9pVEoLrhKfIUfnY9tL4CYO5vwLv62mCQgSC20,1073
12
+ dita_convert-1.0.0.dist-info/METADATA,sha256=9GcsdDw7PUlZYCxHqZHmMRjocct269L-cJtsseM7Eo8,798
13
+ dita_convert-1.0.0.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
14
+ dita_convert-1.0.0.dist-info/entry_points.txt,sha256=WaZkA6L5pH0XjsXOnzc_DLemaL3gfBR_hLsUc7fG38A,61
15
+ dita_convert-1.0.0.dist-info/top_level.txt,sha256=pcySPGjS3m2yMBIIBm9b-Zdh7qTNpybOV9OxOjETKas,5
16
+ dita_convert-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (75.1.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ dita-convert = dita.convert.cli:parse_args
@@ -0,0 +1 @@
1
+ dita