Commits

Anonymous committed f5fa3e9

- a2x: assume resource option is a directory if the name ends with a directory
separator.
- a2x: man page updates.
- a2x: updated 'AsciiDoc EPUB Notes'.

Comments (0)

Files changed (4)

             for r in open(self.resource_manifest):
                 self.resources.append(r.strip())
         for r in self.resources:
-            if os.path.isdir(r):
+            if r.endswith(('/','\\')):
+                if  os.path.isdir(r):
+                    self.resource_dirs.append(r)
+                else:
+                    die('missing resource directory: %s' % r)
+            elif os.path.isdir(r):
                 self.resource_dirs.append(r)
             else:
                 self.resource_files.append(r)
             dst = os.path.normpath(dst)
             if os.path.isabs(dst):
                 die('absolute resource file name: %s' % dst)
-            if dst.startswith('..'):
+            if dst.startswith(os.pardir):
                 die('resource file outside destination directory: %s' % dst)
             src = os.path.join(src_dir, src)
             dst = os.path.join(dst_dir, dst)
     parser.add_option('--stylesheet',
         action='store', dest='stylesheet', default=None,
         metavar='STYLESHEET',
-        help='target HTML CSS stylesheet file name')
+        help='HTML CSS stylesheet file name')
     #DEPRECATED
     parser.add_option('--safe',
         action='store_true', dest='safe', default=False,
 
 *-m, --resource-manifest*='FILE'::
   'FILE' contains a list resources (one per line). Manifest 'FILE'
-  entries are treated just like *--resource* option arguments.
+  entries are formatted just like *--resource* option arguments.
 
 *--stylesheet*='STYLESHEET'::
-  The file name of the docbook-xsl CSS stylesheet file. Defaults to
-  'docbook-xsl.css'.  The stylesheet must reside in a valid <<X3,
-  resource file>> location.
+  The file name of the CSS stylesheet file that is used to style HTML
+  output generated by docbook-xsl. Defaults to 'docbook-xsl.css'.  The
+  stylesheet must reside in a valid <<X3, resource file>> location.
   Applies to HTML formats: 'xhtml', 'epub', 'chunked', 'htmlhelp'
   formats.
 
 following order:
 
 . The 'SOURCE_FILE' directory.
-. Resource directories (specified by *--resource* and
-  *--resource-manifest* options) are searched recursively.
-. The 'asciidoc(1)' `images` and `stylesheets` configuration file
-  directories are searched recursively.
+. Resource directories specified by the *--resource* option (searched
+  recursively).
+. Resource directories specified by the *--resource-manifest* option
+  (searched recursively in the order they appear in the manifest
+  file).
+. The stock `images` and `stylesheets` directories in the
+  'asciidoc(1)' configuration files directories (searched
+  recursively).
 . The destination directory.
 
-When a resource is found it is copied to the correct relative
-destination directory. Destination sub-directories are created
+When a resource file is found it is copied to the correct relative
+destination directory. Missing destination sub-directories are created
 automatically.
 
-A resource specifier (*--resource* option 'RESOURCE_SPEC') can specify
-a single resource file or a directory to be recursively searched for
-resource files. A resource specifier can be either of the following
-two formats:
+There are two distinct mechanisms for specifying additional resources:
+
+. A resource directory which will be searched recursively for missing
+  resource files.
+. A resouce file which will be copied to the output destination
+  directory.
+
+Resources are defined by the  *--resource* option value and can be
+either of the following two formats:
 
   <resource_dir>
   <resource_file>[=<destination_file>]
 
 `<resource_dir>`::
   Specifies a directory (absolute or relative to the 'SOURCE_FILE')
-  which is searched recursively for resource files.
+  which is searched recursively for missing resource files.  To
+  eliminate ambiguity the `<resource_dir>` name should end with a
+  directory separator character.
 
 `<resource_file>`::
   Specifies a resource file (absolute or relative to the
-  'SOURCE_FILE') which is copied to `<destination_file>`. If
+  'SOURCE_FILE') which will be copied to `<destination_file>`. If
   `<destination_file>` is not specified then it is the same as the
   `<resource_file>`.
 
 `<destination_file>`::
   Specifies the destination of the copied source file. The
   `<destination_file>` path is relative to the destination directory
-  (absolute paths are not allowed). The destination directory is
-  format dependent (see the <<X4,*OUTPUT FILES*>> section for
-  details):
+  (absolute paths are not allowed). The location of the destination
+  directory depends on the output 'FORMAT' (see the <<X4,*OUTPUT
+  FILES*>> section for details):
 
-  chunked, htmlhelp;; The chunked directory.
+  chunked, htmlhelp;; The chunked output directory.
   epub;;              The archived `OEBPS` directory.
-  xhtml;;             The *DESTINATION_DIR*.
+  xhtml;;             The output *DESTINATION_DIR*.
 
 Resource specifier examples:
 
-  ../images
+  ../images/
   doc/README.txt=README.txt
   /home/srackham/images/tiger.png=images/tiger.png
 

doc/epub-notes.txt

   ERROR: doc/article.epub/OEBPS/content.opf(6): date value 'Dec 2003'
   is not valid, YYYY[-MM[-DD]] expected
 
-- Navigation headers and admonition icons are suppressed by
-  `docbook-xsl/epub.xsl`
-  (see <<X2,bug report>>).
+- Navigation headers are suppressed by `docbook-xsl/epub.xsl` (see
+  <<X3,bug report>>).
 
 
 DocBook XSL Stylesheets related limitations and bugs
 
 
 === epub: Unreferenced callout icons in OPF
+NOTE: A workaround  for this problem was added in `a2x(1)` version
+8.6.5.
+
 https://sourceforge.net/tracker/?func=detail&aid=2854075&group_id=21935&atid=373747
 
 Environment: DocBook XSL 1.75.2; Xubuntu 8.04
 
 [[X2]]
 === epub: admonition icon images missing from contents.opf
+NOTE: A workaround  for this problem was added in `a2x(1)` version
+8.6.5.
+
 https://sourceforge.net/tracker/?func=detail&aid=2849681&group_id=21935&atid=373747
 
 Environment: DocBook XSL 1.75.2; Xubuntu 8.04
 which are processed correctly.
 
 
+[[X3]]
 === Table width attribute validation error
 https://sourceforge.net/tracker/?func=detail&aid=2848734&group_id=21935&atid=373747
 

docbook-xsl/epub.xsl

 <xsl:param name="suppress.navigation" select="1"/>
 
 <!--
-DocBook XSL 1.75.2 doesn't handle admonition icons
--->
-<xsl:param name="admon.graphics" select="0"/>
-
-<!--
 DocBook XLS 1.75.2 doesn't handle TOCs
 -->
 <xsl:param name="generate.toc">