This is a general XSLT/XPath question, nothing specific to Saxon, so I suggest you ask it on the xsl-list at mulberrytech.com. You may well find someone who has done it before. It would help to explain the constraints, e.g. whether you are in XSLT 2.0.

Michael Kay
Saxonica

On 13/09/2010 11:50 AM, Meeraj Kunnumpurath wrote:
Hi,

I have requirement to split a line into multiple lines based on length, however, breaking on word boundaries. This means if the last word on a given line doesn't fit into the current line it spills over to the next line. Also if a word is longer than the line-length, it will get split based on the line length. Is there anyway to do this using just XPath 2.0 functions and not using recursive calls?

Input

<test>
    one flew over the cuckoo's nest the godfather the shining once upon a time in america the goodfellas scarface.
</test>

Output where the line length is 35

01234567890123456789012345678901234

one flew over the cuckoo's nest the

 godfather the shining once upon a
time in america the goodfellas
scarface.

Thanks
Meeraj
------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/saxon-help