xsl-list
[Top] [All Lists]

Re: [xsl] When to use text()

2014-03-23 14:23:13
On 14-03-23 11:26 AM, Ihe Onwuka wrote:
:)

Btw... the tip where you showed me where you recreate elements the way
you want so you can apply templates to them.

Brilliant. It was very useful last week.

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


Thanks.

On Sun, Mar 23, 2014 at 6:21 PM, Martin Holmes <mholmes(_at_)uvic(_dot_)ca> 
wrote:
On 14-03-23 11:05 AM, Ihe Onwuka wrote:

On Sun, Mar 23, 2014 at 6:01 PM, David Carlisle 
<davidc(_at_)nag(_dot_)co(_dot_)uk> wrote:

On 23/03/2014 17:52, Ihe Onwuka wrote:


text.


What on earth is that?


in this day and age of mobile technology a 5 year old could tell you.


It sounds like you are expecting it to return an SMS message. :-)

Cheers,
Martin


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>