Hi Julien

If you are able, could you please post a patch along with a sample custom
stylesheet that works with the patch.

Thanks, Stuart


On 25/08/12 02:33, Julien Moutinho wrote:
Hi there!

Stuart Rackham wrote:
I'v added a --xsl-file option to a2x that allows you to override the built-in
XSL driver files with a custom XSL file, please give it a try and report back

I haven't found any URL reference prefix for Asciidoc's XSL stylesheets,
would it be possible to have one?
For instance, using the currently available repository and not
considering different versions of the XSL stylesheets:
        http://asciidoc.googlecode.com/hg/docbook-xsl/

That would give more portability when one wants to customize
Asciidoc's XSL stylesheets through --xsl-file.

Follows a patch that does this for Debian (maintainer added in Cc:):

$ diff -Nru old/asciidoc-8.6.7  new/asciidoc-8.6.7
diff -Nru old/asciidoc-8.6.7/debian/asciidoc.xmlcatalogs 
new/asciidoc-8.6.7/debian/asciidoc.xmlcatalogs
--- old/asciidoc-8.6.7/debian/asciidoc.xmlcatalogs      1970-01-01 
01:00:00.000000000 +0100
+++ new/asciidoc-8.6.7/debian/asciidoc.xmlcatalogs      2012-08-24 
16:15:58.300390101 +0200
@@ -0,0 +1,4 @@
+local;docbook-xsl/catalog.xml;/etc/asciidoc/docbook-xsl/catalog.xml
+
+root-and-package;uri;http://asciidoc.googlecode.com/hg/docbook-xsl/;/etc/asciidoc/docbook-xsl/catalog.xml
+root-and-package;system;http://asciidoc.googlecode.com/hg/docbook-xsl/;/etc/asciidoc/docbook-xsl/catalog.xml
diff -Nru old/asciidoc-8.6.7/debian/rules new/asciidoc-8.6.7/debian/rules
--- old/asciidoc-8.6.7/debian/rules     2012-08-24 16:07:20.000000000 +0200
+++ new/asciidoc-8.6.7/debian/rules     2012-08-24 16:08:42.088394260 +0200
@@ -25,6 +25,7 @@
         dh clean

  override_dh_install:
+       dh_installxmlcatalogs
         dh_install
         rm debian/asciidoc/usr/bin/a2x
         mv debian/asciidoc/usr/bin/a2x.py debian/asciidoc/usr/bin/a2x
diff -Nru old/asciidoc-8.6.7/docbook-xsl/catalog.xml 
new/asciidoc-8.6.7/docbook-xsl/catalog.xml
--- old/asciidoc-8.6.7/docbook-xsl/catalog.xml  1970-01-01 01:00:00.000000000 
+0100
+++ new/asciidoc-8.6.7/docbook-xsl/catalog.xml  2012-08-24 16:15:29.728390375 
+0200
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+  <rewriteURI         uriStartString="http://asciidoc.googlecode.com/hg/docbook-xsl/"; 
rewritePrefix="./"/>
+  <rewriteSystem systemIdStartString="http://asciidoc.googlecode.com/hg/docbook-xsl/"; 
rewritePrefix="./"/>
+ </catalog>

Then one could write a custom XSL stylesheet
to be used with a2x's --xsl-file and xsltproc's --nonet,
like this:
--- 8< ---
<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  version='1.0'>
   <xsl:include 
href="http://asciidoc.googlecode.com/hg/docbook-xsl/manpage.xsl"/>
   <!-- NOTE: custom XSL for Asciidoc's manpage.xsl goes here -->
  </xsl:stylesheet>
--- >8 ---

        --julm


--
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to