Re: Wrapping pieces of content separately
To add to what Jay says, this is going to be a common problem as the requirement to generate schema-valid XHTML becomes more common, as it now seems to be doing.
Jay's approach is one way to do it. There are also others; which is best probably depends. If you are maintaining your stylesheets in connection with a source format (with a schema), relating the logic of paragraph-splitting to the declarations of that schema may be the most dependable, but Jay's approach (which examines the placement of text nodes) has the virtue of flexibility and doesn't require extra effort when the source format changes. One of the down sides of Jay's way is that you may have issues with white space (though those too could be coded around)....
Another difference will be whether you can use XSLT 2.0 or not. With 2.0 pipelining there are various ways you can annotate your input document to make it easier to split the paragraphs around the lists, tables etc.; and you also have very nice grouping constructs native to the language.
Eventually we'll probably see web tutorials about this. Unfortunately for me, this probably goes on list #3 (things I'd do if I had not only another life to do them, but extra time in that other life) so someone else may get the credit (and deserve it).
At 05:07 PM 8/24/2006, Jay wrote:
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format