[Home]  [List]  [News]  [Docs]  [FAQ]  [Downloads]  [Resources]  [About]
Search :
/Home /List

Archives of team4xt (now merged with list4xt).

[team4xt] Re: FAQ 4xt

Subject: [team4xt] Re: FAQ 4xt

User: Website

From: Eric van der Vlist (vdv@dyomedea.com)
Date: 19/04/2000 - 08:48


Hi Paul,

Paul Tchistopolskii wrote:
> I think that current view of the answers ( especially answers with
> the source code ) is a mess.

Yes, I have to agree...
 
> I could try fixing the rendering, if you provide your stylesheet
> ( unfortunately this could take a while, because I have absolutely
> no time to the end of this week ).

You'll find a copy of the whole site tar-gziped at /4xt.gz
Please note that I am working on the same files and they can be slightly
out of date...

The stylesheet for the faq is real simple :

------------
<xsl:template match="document-faq">
        <xsl:param name="faq" select="document(@src)"/>
        <xsl:apply-templates select="$faq/faq:faq/faq:head"/>
        <a name="content"/>
        <h2>Table of content</h2>
        <p><xsl:apply-templates
select="$faq/faq:faq/faq:body/faq:section/faq:qna" mode="summary"/></p>
        <h2>Q &amp; A</h2>
        <p><xsl:apply-templates
select="$faq/faq:faq/faq:body/faq:section/faq:qna" mode="detail"/></p>
</xsl:template>

<xsl:template match="faq:head">
        <xsl:apply-templates select="faq:title"/>
        <xsl:apply-templates select="faq:maintain"/>
        <xsl:apply-templates select="faq:hdr/faq:content"/>
</xsl:template>

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

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

<xsl:template match="faq:maintain">
        <p><em>Maintained by : <a href="mailto:{faq:email}"><xsl:value-of
select="faq:name"/></a></em></p>
</xsl:template>

<xsl:template match="faq:qna" mode="summary">
        <li><a href="#{position()}"><xsl:value-of select="faq:q"/></a></li>
</xsl:template>

<xsl:template match="faq:q" mode="detail">
        <strong><xsl:apply-templates/></strong>
</xsl:template>

<xsl:template match="faq:author" mode="detail">
        <br/><em><xsl:value-of select="faq:name"/></em>
</xsl:template>

<xsl:template match="faq:a" mode="detail">
        <br/><xsl:apply-templates/>
</xsl:template>

<xsl:template match="faq:link">
        <a href="{@href}"><xsl:apply-templates/></a>
</xsl:template>

<xsl:template match="faq:qna" mode="detail">
        <hr/><a name="{position()}"/><p>
                <h3><xsl:apply-templates select="faq:q" mode="detail"/></h3>
                <xsl:apply-templates select="faq:author" mode="detail"/>
                <xsl:apply-templates select="faq:a" mode="detail"/>
        </p>
        <p>Up to <a href="#content">table of content</a></p>
</xsl:template>
--------------

and I think that we should rather work on cleaning the xml source.

Dave has done a tremendous work extracting all the relevant Q and A, but
most of the mails are simply copied into the xml source file and
displayed as pre-formatted in HTML.

Unless you add a sophisticated algorithm to get part of the format
available in the mails, you can't simply remove redundant line feeds or
other formatting "mess" :(

> BTW - any plans of publishing the stylesheets used for creation
> of 4xt.org somewhere on 4xt.org ?

Yes, I like a lot the idea of a kind of "glass site" where we use the
technology we are documenting and use the infrastructure of the site
itself as a pedagogic tool.

It's my main motivation for not using a site like sourceforge.net.
 
> Also, I'l suggest pre-generation of FAQ page. I'm also wondering,
> how are your sharing the file with DaveP ? I was thinking that
> the cleanest solution is to introduce xslt="yes" attribute and
> then just render only that part of the entire FAQ. Or something
> like that. If DaveP provides the URL to his xml file - that means
> simple cron script running on 4xt.org will do the trick,
> re-generating the FAQ on 4xt.org side automatically.

This is (also) a good question.
We (Dave and I) thinking of a simple email exchange with the additions,
but it was before Dave decided to switch to docbook for his FAQ.

I think we have first to decide what we want to do with this FAQ, then
to decide which format to use and then to see how we can synchronize the
2 sites...

1) Target of the FAQ.

Do we just want to publish an extract of the general XSL FAQ ?
or to we plan also to update the answers when needed to elaborate on XT
specific aspects and to ass questions coming through our own mailing
list ?
Is Dave interested by updating his general XSL FAQ with the update of
ours ?

2) Which format ?

Dave, can you explain which benefit you see from switching to docbook ?
Isn't it better to use a DTD built for FAQs which clearly separates the
questions and the answers ?

3) Synchronization

Depending on the answer of 1 and 2 (and also of the volume), we'll see
if we can just use a simple email exchange or if we need to setup
something more sophisticated...

> > For Paul, I will add that this is an example where the lack of side
> > effect makes that you have to process the xml document twice (once for
> > the table of content and then again for the detail).
>
> Not sure that's a clean example ( custom header for every page of
> financial report rendered to the plain text is cleaner, I think
> ( forces *much* more than just 2 repetitions ). In your case
> I guess the caclulation of the anchor name is the dublicated
> operation , right ?

Yes, mainly, but it also includes searching for all the questions in the
document twice :

<h2>Table of content</h2>
<p><xsl:apply-templates
select="$faq/faq:faq/faq:body/faq:section/faq:qna" mode="summary"/></p>
<h2>Q &amp; A</h2>
<p><xsl:apply-templates
select="$faq/faq:faq/faq:body/faq:section/faq:qna" mode="detail"/></p>

Thanks

Eric

> Rgds.Paul.
>
> --
> Private list of the "Team 4 XT" team4xt@4xt.org ()
> (mailto:team4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)

-- 
------------------------------------------------------------------------
Eric van der Vlist       Dyomedea                    http://dyomedea.com
creator                  http://xmlfr.org            http://ducotede.com
editor                   http://xmlhack.com              http://dmoz.org
------------------------------------------------------------------------

-- Private list of the "Team 4 XT" team4xt@4xt.org () (mailto:team4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)



Archive generated by hypermail 2b28 on 02/06/2000 - 03:10 EDT

webmaster@4xt.org