forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piroumian Konstantin <KPiroum...@protek.com>
Subject RE: Forrest new style
Date Thu, 06 Jun 2002 08:42:19 GMT
> From: Robert Koberg [mailto:rob@koberg.com] 
> 
> Hi guys,
> 
> I have been switching around my network - so very sorry if 
> emails bounced!
> ----- Original Message -----
> From: "Konstantin Piroumian" <KPiroumian@protek.com>
> > From: "Bert Van Kets" <bert@vankets.com>
> > > > What needs to be added/changed:
> > > - make the links on the tabs independent of the build 
> target (TMHO we
> need
> > > some code here :( )
> > > - make the top path depending on a site.xml file or some 
> other source
> > > - make paging work
> >
> > Hm... Does anybody have an idea on how to paginate the 
> content? I know how
> > to do it when pages are placed in separate files, but how 
> to split an XML
> > file into pages and keep it well-formed? It's definitely 
> time to have a
> look
> > at Stefano's paginating transformer.
> >
> If you can use a true site map you could do something like:
> 
> <xsl:template match="page" mode="snailtrail">

This imply that we already have 'paginated' content, which is not true for
now. Pages are something that are orthogonal to book chapters and sections.
This mean that a page break can be placed in the middle of a paragraph:
<p> Some text
and some more here...
	<page-break/>  (or <pb/>)
This text is on the second page...
</p>

If we output only the first page:
<p> Some text
and some more here...
	<page-break/>

then it won't be well-formed XML any more and I don't know how a stylesheet
can transform a document into something like this. So, the conclusion is
that the pagination can be performed only on the top-level sections that
would provide a well-formed XML. 

I'd like to see other/more solutions to this problem.

Konstantin

> 
>     <xsl:apply-templates select="parent::folder" mode="snailtrail"/>
> 
>     <xsl:value-of select="@label"/>
> 
> </xsl:template>
> 
> <xsl:template match="folder" mode="snailtrail">
> 
>     <xsl:variable name="index_id" select="@index_page"/>
>     <xsl:variable name="index_page" select="page[@id=$index_id]"/>
>     <xsl:variable name="style_fileref">
>         <xsl:choose>
>             <xsl:when test="$index_page/@xsl_fileref='default' or
> not(boolean($index_page/@id))">
>                 <xsl:value-of select="@xsl_fileref"/>
>             </xsl:when>
>             <xsl:when test="$index_id='empty'">
>                 <xsl:text>body_empty-folder.xsl</xsl:text>
>             </xsl:when>
>             <xsl:otherwise>
>                 <xsl:value-of select="$index_page/@xsl_fileref"/>
>             </xsl:otherwise>
>         </xsl:choose>
>     </xsl:variable>
>     <xsl:variable name="_href">
>         <xsl:apply-templates select="parent::folder"
> mode="snailtrail_path"/>
>         <xsl:text>/</xsl:text>
>         <xsl:value-of select="translate(@name, ' ', '_')"/>
>         <xsl:text>/</xsl:text>
>         <xsl:value-of select="translate($index_page/@label, ' 
> ', '_')"/>
>         <xsl:value-of select="$index_page/@file_ext"/>
>     </xsl:variable>
> 
>     <xsl:apply-templates select="parent::folder" mode="snailtrail"/>
> 
>     <a href="{$_href}">
>         <xsl:value-of select="@label"/>
>     </a>
> 
>     <xsl:text> : </xsl:text>
> </xsl:template>
> 
> <xsl:template match="folder" mode="snailtrail_path">
>     <xsl:apply-templates select="parent::folder" 
> mode="snailtrail_path"/>
>     <xsl:text>/</xsl:text>
>      <xsl:value-of select="translate(@name, ' ', '_')"/>
> </xsl:template>
> 

Mime
View raw message