Re: Patch for doctype and faq

Jeff Martin <[email protected]> Fri, 08 Apr 2005 15:52:33 +0100
Newsgroups gmane.editors.conglomerate.devel
Message-ID <[email protected]>
You really are hard work

On Fri, 2005-04-08 at 16:31 +0200, Michèle Garoche wrote:
> Le 8 avr. 2005, à 16:26, Jeff Martin a écrit :
> 
> > Okay here's how it works
> >
> > faq.xml get renamed to faq.xml.orig
> >
> > The attached patch gets applied which adds a rule to the build which
> > generates faq.xml from faq.xml.original using faq-hack.xsl replacing 
> > the
> > qanda stuff with sections.
> No, it will not be good, since there is a hierarchy in sections sect1 
> for quandadiv; sect2 for question/answer)

Oh, turns out you can do that with xsl after all, silly me. (See
attachment)

> Then it does not integrate the faq into the manual which was the goal 
> primarily, because at the moment nobody sees there is a faq.

Still don't follow your logic here. Surely if faq.xml gets into the
manual a generated version will get into the manual just as well as a
hand crafted masterpiece.

> 
> But don't worry I do it only for Fink and it is good as well for me, as 
> I told at the very beginning of this thread.

Might be nice for everyone to share the benefits of your improvements
not just the finkers.

> 
> Michèle
> <http://micmacfr.homeunix.org>
> _______________________________________________
> Conglomerate-devel mailing list
> [email protected]
> http://lists.copyleft.no/mailman/listinfo/conglomerate-devel
-- 
Jeff Martin

Memetic Engineer

http://www.custommonkey.org/

_______________________________________________
Conglomerate-devel mailing list
[email protected]
http://lists.copyleft.no/mailman/listinfo/conglomerate-devel
faq-hack.xsl (text/x-xslt, 684 B)
<?xml version ="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
		version="1.0">

  <xsl:template match ="qandaset|question|answer">
    <xsl:apply-templates />
  </xsl:template>

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

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

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

  <xsl:template match="*">
    <xsl:copy>
      <xsl:copy-of select="@*"/>
      <xsl:apply-templates/>
    </xsl:copy>
  </xsl:template>

</xsl:stylesheet>