docbook-apps

  • 1.  Any source of Plain-text stylesheets?

    Posted 08-13-2007 00:55
    I need to find docbook stylesheets that can strip off xml markup, as
    well as any content that is not plaintext.
    Do someone on this list know of any such source.
    Alternately, do some one know of any grammar checker for the english
    language, hosted on Mac OS X,
    that retains xml markup.

    -------------------------------------
    This sig is dedicated to the advancement of Nuclear Power
    Tommy Nordgren
    tommy.nordgren@comhem.se






  • 2.  Re: [docbook-apps] Any source of Plain-text stylesheets?

    Posted 08-13-2007 06:10
    Hi,

    I'm not quite sure what you're asking for. If you want a stylesheet that
    simply returns the text from an XML document and does nothing else, then I
    believe something as simple as:

    <xsl:template match="/">
    <xsl:apply-templates/>
    </xsl:template>

    ...would suffice. Unless you want it in some specific format? Please
    elaborate a little further and I'm sure someone can help you more.

    Colin

    On 8/12/07, Tommy Nordgren <tommy.nordgren@comhem.se> wrote:
    >
    > I need to find docbook stylesheets that can strip off xml markup, as
    > well as any content that is not plaintext.
    > Do someone on this list know of any such source.
    > Alternately, do some one know of any grammar checker for the english
    > language, hosted on Mac OS X,
    > that retains xml markup.
    >
    > -------------------------------------
    > This sig is dedicated to the advancement of Nuclear Power
    > Tommy Nordgren
    > tommy.nordgren@comhem.se
    >
    >
    >
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >
    >



  • 3.  Re: [docbook-apps] Any source of Plain-text stylesheets?

    Posted 08-13-2007 06:40
    Colin Shapiro wrote:
    > Hi,
    >
    > I'm not quite sure what you're asking for. If you want a stylesheet that
    > simply returns the text from an XML document and does nothing else, then I
    > believe something as simple as:
    >
    > <xsl:template match="/">
    > <xsl:apply-templates/>
    > </xsl:template>
    >
    > ...would suffice. Unless you want it in some specific format? Please
    > elaborate a little further and I'm sure someone can help you more.


    Yes for inlines. Not helpful for block elements?
    lists become indented,
    para's seperated by single line feed,
    tables..... not easy.

    etc.

    That's my definition of 'plain text'.



    regards

    --
    Dave Pawson
    XSLT XSL-FO FAQ.
    http://www.dpawson.co.uk



  • 4.  Re: [docbook-apps] Any source of Plain-text stylesheets?

    Posted 08-13-2007 06:59
      |   view attached
    The best option I've found is to generate HTML and then convert to text
    using "links" tool, for example.

    Camille.

    Dave Pawson wrote:
    > Colin Shapiro wrote:
    >> Hi,
    >>
    >> I'm not quite sure what you're asking for. If you want a stylesheet that
    >> simply returns the text from an XML document and does nothing else,
    >> then I
    >> believe something as simple as:
    >>
    >> <xsl:template match="/">
    >> <xsl:apply-templates></xsl:apply-templates>
    >> </xsl:template>
    >>
    >> ...would suffice. Unless you want it in some specific format? Please
    >> elaborate a little further and I'm sure someone can help you more.
    >
    >
    > Yes for inlines. Not helpful for block elements?
    > lists become indented,
    > para's seperated by single line feed,
    > tables..... not easy.
    >
    > etc.
    >
    > That's my definition of 'plain text'.
    >
    >
    >
    > regards
    >


    Attachment(s)

    vcf
    camille.vcf   333 B 1 version


  • 5.  Re: [docbook-apps] Any source of Plain-text stylesheets?

    Posted 08-13-2007 13:53

    On 13 aug 2007, at 08.09, Colin Shapiro wrote:

    > Hi,
    >
    > I'm not quite sure what you're asking for. If you want a
    > stylesheet that simply returns the text from an XML document and
    > does nothing else, then I believe something as simple as:
    >
    > <xsl:template match="/">
    > <xsl:apply-templates/>
    >
    > </xsl:template>
    >
    This does part of what I want.
    It's necessary to add lines of the following type for every element
    type I want to cut out:
    <xsl:template match="programlisting" />
    Of course, now I have another problem: Stripping out the xml
    declaration in the output file.
    As for what I want, it should be obvious from the second part of my
    question: To check the English language grammar
    embedded in DocBook markup. I can't do this directly from my xml
    editor, because my grammar checking software mangles xml markup
    (Strips off data type declaration and drops end tags!!)
    > ...would suffice. Unless you want it in some specific format?
    > Please elaborate a little further and I'm sure someone can help you
    > more.
    >
    > Colin
    >
    > On 8/12/07, Tommy Nordgren <tommy.nordgren@comhem.se> wrote: I need
    > to find docbook stylesheets that can strip off xml markup, as
    > well as any content that is not plaintext.
    > Do someone on this list know of any such source.
    > Alternately, do some one know of any grammar checker for the english
    > language, hosted on Mac OS X,
    > that retains xml markup.
    >
    > -------------------------------------
    > This sig is dedicated to the advancement of Nuclear Power
    > Tommy Nordgren
    > tommy.nordgren@comhem.se
    >
    >
    >
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-
    > open.org
    >
    >

    ------
    What is a woman that you forsake her, and the hearth fire and the
    home acre,
    to go with the old grey Widow Maker. --Kipling, harp song of the
    Dane women
    Tommy Nordgren
    tommy.nordgren@comhem.se






  • 6.  Re: [docbook-apps] Any source of Plain-text stylesheets?

    Posted 08-13-2007 09:01
    Tommy Nordgren wrote:
    > I need to find docbook stylesheets that can strip off xml markup, as
    > well as any content that is not plaintext.


    http://lynx.browser.org/
    Lynx is a browser that is very simple.

    Suggestion.

    Generate the html using the docbook stylesheets.

    Then use Lynx to download the file and save it as plain text.
    http://lynx.isc.org/lynx2.8.5/lynx2-8-5/lynx_help/Lynx_users_guide.html#RemoteSource


    (I seem to remember there was a command line option to load the file,
    then save to disk as plain text, but I can't find it)

    HTH


    regards

    --
    Dave Pawson
    XSLT XSL-FO FAQ.
    http://www.dpawson.co.uk



  • 7.  Re: [docbook-apps] Any source of Plain-text stylesheets?

    Posted 08-13-2007 09:09
    Quoting Dave Pawson <davep@dpawson.co.uk>:

    > (I seem to remember there was a command line option to load the file,
    > then save to disk as plain text, but I can't find it)
    >

    This would be

    lynx -dump somefile.html

    However, as stripping the tags from a DocBook XML file is not a
    DocBook-specific task, there should be general XML tools that do just
    that. I just don't remember one.

    regards,
    Markus

    --
    Markus Hoenicka
    markus.hoenicka@cats.de
    (Spam-protected email: replace the quadrupeds with "mhoenicka")
    http://www.mhoenicka.de