[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
"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:
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.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Re: [xsl] xsl to Html help please
Subject: Re: [xsl] xsl to Html help please From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 28 Mar 2001 16:01:07 +0000 |
"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@xxxxxxxxxxxxxxxx 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xsl to Html help please, Java XML | Thread | Re: [xsl] xsl to Html help please, David Carlisle |
RE: [xsl] sorting using a precalcul, Stephane Bailliez | Date | Re: [xsl] CJK UTF-16 test, Dave Hartnoll |
Month |