This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: xsl to Html help please


"JaxLive":

What you're describing (whatever your name is!) may or may not be possible, 
depending on how regular your data is.

The reason it's so difficult to "see to it that the paragraph structure is 
not lost" is that, in the code you present, it's not there to begin with:

><text>hello how are u and looking take care of ur self and be a good boy
>son.
>            And talking about ur studies study well and get a nice job and
>settle down soon </text>

There's no indication here of any paragraph breaks. A human reader might 
infer there to be a paragraph break, based on the existence of whitespace. 
(On the other hand, looking at the prose, one might infer several 
paragraphs!) But whitespace isn't much to go on: it's notoriously 
undependable. Without markup to delimit the starts and ends of paragraphs, 
no XML parser will see any structure there at all.

If your data is regular enough (that is, if all "paragraph breaks" appear 
exactly the same way, say with a &#A; [line feed] character), you can run a 
recursive template over the text node content of the element to break it up.

If you're sure your data is regular enough to support it, look in the XSL 
FAQ for recursive solutions to this kind of thing (...or ask...). If it's 
not this regular, you're hosed.

Good luck, whatever-your-name-is ...
Wendell


======================================================================
Wendell Piez                            mailto:wapiez@mulberrytech.com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
   Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]