[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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

Subject: Re: problem with xsl:copy-of and counting lines
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 20 Jun 2007 13:17:43 +0100
Re:  problem with xsl:copy-of and counting lines
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.