OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] [HELP] How can I get rid of the output of the <revhistory /> tag in the EPUB output


Hi Bob,

On Tue, 9 Apr 2013 10:04:13 -0700
"Bob Stayton" <bobs@sagehill.net> wrote:

> HI Shlomi,
> Your .xslt file is trying to do two things at once, and it won't work as 
> written.  It seems you need to preprocess the XML to alter the legalnotice, 
> but you should do that step *before* processing it to generate epub output.
> 
> 1.  Run an XSLT process with xsltproc or saxon with your original preprocess 
> stylesheet without importing the epub stylesheet.  That will generate a 
> temporary DocBook XML file with the altered legalnotice.
> 
> 2.  Run the ruby process on that temporary DocBook file using another 
> stylesheet that imports epub/docbook.xsl and includes the empty d:revhistory 
> templates.

Using this stylesheet does not appear to get rid of the revhistory in the
final epub either:

############# Start of docbook-epub-preproc.xsl
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
    xmlns="http://docbook.org/ns/docbook";
    xmlns:d="http://docbook.org/ns/docbook";
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    xmlns:xlink="http://www.w3.org/1999/xlink";
    >

    <xsl:import href="epub/docbook.xsl" />

<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"
    />

<!-- Get rid of the revhistory element -->
<xsl:template match="d:revhistory" mode="titlepage.mode" />
<xsl:template match="d:revhistory" />

</xsl:stylesheet>
############ End.

Any insights will be appreciated.

Regards,

	Shlomi Fish

> 
> Bob Stayton
> Sagehill Enterprises
> bobs@sagehill.net
> 
> --------------------------------------------------
> From: "Shlomi Fish" <shlomif@shlomifish.org>
> Sent: Sunday, April 07, 2013 11:14 AM
> To: "Bob Stayton" <bobs@sagehill.net>
> Cc: <docbook-apps@lists.oasis-open.org>
> Subject: Re: [docbook-apps] [HELP] How can I get rid of the output of the 
> <revhistory /> tag in the EPUB output
> 
> > Hi Bob,
> >
> > sorry for the late response.
> >
> > On Wed, 3 Apr 2013 08:50:54 -0700
> > "Bob Stayton" <bobs@sagehill.net> wrote:
> >
> >> Hi,
> >> I'm not clear what is going wrong with your setup.  I just tried this 
> >> simple
> >> customization stylesheet:
> >>
> >
> > OK, now it seems I am trying the docbook-xsl-ns instead. Here is something 
> > that
> > reproduces this:
> >
> > http://www.shlomifish.org/temp-db5-epub/
> >
> > The http://www.shlomifish.org/temp-db5-epub/epub_repr.zip contains two 
> > files:
> >
> > 1. human-hacking-field-guide--english.db5.xml - the DocBook 5/XML file.
> >
> > 2. docbook-epub-preproc.xslt - the customisation layer.
> >
> > 3. epub-build.bash - a script I use to locally build it.
> >
> > Can you tell me what is wrong? I also tried it with:
> >
> >    <xsl:import href="docbook-xsl-ns-snapshot/epub/docbook.xsl" />
> >
> > Instead.
> >
> > Best regards,
> >
> > Shlomi Fish
> >
> >
> >> --------------------------------------------------------------------------------------------------------------
> >> <?xml version="1.0" encoding="utf-8"?>
> >> <xsl:stylesheet
> >>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> >>   xmlns:d="http://docbook.org/ns/docbook";
> >>   version="1.0">
> >>
> >> <xsl:import href="docbook-xsl-ns-1.78.1/epub/docbook.xsl"/>
> >>
> >> <xsl:template match="d:revhistory" mode="titlepage.mode"/>
> >>
> >> </xsl:stylesheet>
> >> --------------------------------------------------------------------------------------------------------------
> >>
> >> I ran this command on a DocBook 5 book containing info/revhistory:
> >>
> >> docbook-xsl-1.78.1/epub/bin/dbtoepub -s custom5.xsl mybook.xml
> >>
> >> and the revhistory does not show on the title page.  So the custom XSL
> >> template does work, but for some reason is not being applied in your 
> >> setup.
> >> Can you put an XSL message in your custom template to see if it is being
> >> called?
> >>
> >> Bob Stayton
> >> Sagehill Enterprises
> >> bobs@sagehill.net
> >>
> >> --------------------------------------------------
> >> From: "Shlomi Fish" <shlomif@shlomifish.org>
> >> Sent: Tuesday, April 02, 2013 2:56 PM
> >> To: "Bob Stayton" <bobs@sagehill.net>
> >> Cc: <docbook-apps@lists.oasis-open.org>
> >> Subject: Re: [docbook-apps] [HELP] How can I get rid of the output of the
> >> <revhistory /> tag in the EPUB output
> >>
> >> > Hi Bob,
> >> >
> >> > On Tue, 2 Apr 2013 09:37:36 -0700
> >> > "Bob Stayton" <bobs@sagehill.net> wrote:
> >> >
> >> >> Hi,
> >> >> I would have written those custom templates to match on revhistory, 
> >> >> not
> >> >> on
> >> >> the descendants of revhistory:
> >> >>
> >> >> <!-- Get rid of the revhistory element -->
> >> >> <xsl:template match="d:revhistory" mode="titlepage.mode" />
> >> >> <xsl:template match="d:revhistory" />
> >> >>
> >> >> Did you try that?
> >> >>
> >> >
> >> > I tried it - yes. Didn't work.
> >> >
> >> > Regards,
> >> >
> >> > Shlomi Fish
> >> >
> >> > -- 
> >> > -----------------------------------------------------------------
> >> > Shlomi Fish       http://www.shlomifish.org/
> >> > What does "Zionism" mean? - http://shlom.in/def-zionism
> >> >
> >> > In Soviet Russia, superstition believes in you. — Sawyer X
> >> >
> >> > Please reply to list if it's a mailing list post - 
> >> > http://shlom.in/reply .
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> >> > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
> >> >
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> >> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
> >>
> >
> >
> >
> > -- 
> > -----------------------------------------------------------------
> > Shlomi Fish       http://www.shlomifish.org/
> > Buffy Factoids - http://www.shlomifish.org/humour/bits/facts/Buffy/
> >
> > Comedy is simply a funny way of being serious.
> >    — http://en.wikiquote.org/wiki/Peter_Ustinov
> >
> > Please reply to list if it's a mailing list post - http://shlom.in/reply .
> >
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
> 



-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
My Aphorisms - http://www.shlomifish.org/humour.html

If God exists and is the ego‐maniacal, sadistic and helpless creature that is
described in the Old Testament, then we’re in deep trouble.

Please reply to list if it's a mailing list post - http://shlom.in/reply .


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]