[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: When to use text()
On 14-03-23 11:26 AM, Ihe Onwuka wrote:
:) I think it's a common technique. The thing to watch out for is that your created nodes have no context -- so for instance if you create a <date> node, it won't trigger a template such as: <xsl:template match="birth/date"> I mostly seem to use this approach when I'm unravelling nested items. TEI, for instance, allows <tei:list> inside <tei:p>, but HTML doesn't allow <html:ol> or <html:ul> inside <html:p>; ODT presents similar challenges. One way to handle this is to pass your <p> elements to a template that spits out the bits-between-lists as new <tei:p> elements, and the lists between them, in sequence, and then call apply-templates on the newly-created elements. Arguably you're changing the conceptual structure here by breaking up <p> elements, but sometimes it doesn't matter, especially if the output is for some temporary purpose and won't be archived. Cheers, Martin
|
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
|