Print

Print


Forgot to mention that each output page is generated by means of a specific xsl:result-document.

Le 1 août 2011 à 08:29, Laurent Romary a écrit :

> It just happens that we had to deal with a similar problem of chunking a document in pages to visualize each page one by one in a frame and did this with Solenne Coutagne (student from Ecole des CHartes) by means of two variables that are propagated at each processing step. I have somehow simplified the stylesheet below by just outlining the entry template and providing a simple application for text nodes, "normal" element (p) and empty ones (lb).
> 
>     <xsl:template match="/">
>         <xsl:for-each select="//tei:pb">
>             <xsl:apply-templates select="//tei:body">
>                 <xsl:with-param name="anfang" select="."/>
>                 <xsl:with-param name="ende" select="following::tei:pb[1]"/>
>             </xsl:apply-templates>
>         </xsl:for-each>
>      </xsl:template>
> 
>     <xsl:template match="text()">
>         <xsl:param name="anfang"/>
>         <xsl:param name="ende"/>
>         <xsl:if test="not(following::tei:pb[@n=$anfang/@n]) and not(preceding::tei:pb[@n=$ende/@n])">
>             <xsl:value-of select="."/>
>         </xsl:if>
>     </xsl:template>
> 
>     <xsl:template match="tei:p">
>         <xsl:param name="anfang"/>
>         <xsl:param name="ende"/>
>         <xsl:if test="not(following::tei:pb[@n=$anfang/@n]) and not(preceding::tei:pb[@n=$ende/@n])">
>             <p>
>                 <xsl:apply-templates>
>                     <xsl:with-param name="anfang" select="$anfang"/>
>                     <xsl:with-param name="ende" select="$ende"/>
>                 </xsl:apply-templates>
>             </p>
>         </xsl:if>
>     </xsl:template>
> 
>     <xsl:template match="tei:lb">
>         <xsl:param name="anfang"/>
>         <xsl:param name="ende"/>
>         <xsl:if test="not(following::tei:pb[@n=$anfang/@n]) and not(preceding::tei:pb[@n=$ende/@n])">
>             <br/>
>         </xsl:if>
>     </xsl:template>
> 
> 
> 
> Le 31 juil. 2011 à 05:05, Hayim Lapin a écrit :
> 
>> I seem to have stepped into a mess. Thanks to those of you who responded. And may I say that this is an amazing group!
>> 
>> HL
>> Hayim Lapin
>> Robert H. Smith Professor of Jewish Studies
>> and Professor of History
>> Director, Joseph and Rebecca Meyerhoff Center for Jewish Studies.
>> 
>> 
>> From: Sebastian Rahtz <[log in to unmask]>
>> Reply-To: Sebastian Rahtz <[log in to unmask]>
>> Date: Sat, 30 Jul 2011 17:20:39 -0400
>> To: "[log in to unmask]" <[log in to unmask]>
>> Subject: Re: <pb/> promotion (was Has anybody tried converting Oxygen track changes to tei:add|del?)
>> 
>> Trouble is, that means special-casing div. The para split is surely ok?
>> 
>> Sent from my HTC
>> 
>> ----- Reply message -----
>> From: "Lou Burnard" <[log in to unmask]>
>> Date: Sat, Jul 30, 2011 16:08
>> Subject: <pb/> promotion (was Has anybody tried converting Oxygen track changes to tei:add|del?)
>> To: "Sebastian Rahtz" <[log in to unmask]>
>> Cc: "[log in to unmask]" <[log in to unmask]>
>> 
>> 
>> On 30/07/11 15:49, Sebastian Rahtz wrote:
>> 
>> >     1. This may not not be what you actually want to get out
>> >     2. All hell may break loose later when you end up with many copies of the same element (see the repeated
>> >         <div>  in the example below)
>> >
>> > Whether the use of @prev is right, I am wondering with myself.
>> 
>> 
>> I would say probably not: it only makes sense in the presence of an 
>> additional attribute @part="yes" so that you can distinguish these <div 
>> type="stave">s (which don't actually contain a complete stave) from 
>> those which do.
>> 
>> I am wondering whether it wouldn't be better to introduce some other 
>> intermediate element (a seg would do) to wrap these fragmentary divs.
> 
> Laurent Romary
> INRIA & HUB-IDSL
> [log in to unmask]
> 
> 
> 

Laurent Romary
INRIA & HUB-IDSL
[log in to unmask]