Re: [xsl] problem with xsl:copy-of and counting lines

Subject: Re: [xsl] problem with xsl:copy-of and counting lines
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 20 Jun 2007 13:17:43 +0100
but your problem description is refering to the number of lines in a
printed form of the document which has only a slight relationship
to the number of lines in the source xml.

The input sample in your original post looked basically like html plus
some custom tags.

I'll assume the elements work as they do in html, so that an element like

   <li>Was sagen die Blutzucker-Messwerte aus?</li>

would produce multiple lines of output if the text was sufficiently
long, even if it had no line breaks in the source, and conversely
if the input was

   <li>
    Was sagen die Blutzucker-Messwerte aus?
   </li>

the output would be the same, on one line, even though teh XML source
was spread over three.

I assume this makes a single row of a table, so one line of output even
though the code discussed so far woul count it as 7 (unless you have
specified xsl:strip-sapace in your stylesheet in which case the
indentation nodes will be ignored and it would be counted as 0 as it
doesn't contribute any #10 characters to the block.

 <tr>
   <tag>So</tag>
   <datum>13.06.07</datum>
   <uhrzeit>14:00 - 15:30 Uhr</uhrzeit>
   <kursnr>Kurs-Nr.: </kursnr>
   <nr>50</nr>
   <beitrag>10 Euro</beitrag>
   </tr>


If the thing is being displayed as a table, the first number of interest
is probably the number of rows, which is count(block/kursinfo/tr) I'd
guess.

David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________

Current Thread