Subject: Re: [xsl] Split element with mixed content From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Thu, 02 Aug 2007 19:01:48 +0200 |
0: for simplicity, assume an empty element <split/> at the split point.
1: generate the first element, by copying any node that precedes <split/> or
that is an ancestor of <split/>. (Easier in 2.0 with the << operator)
2. generate the second element, by copying any node that follows <split/> or
that is an ancestor of <split/>. (So the nodes that are ancestors of
<split/> are copied into both halves.)
"Copy" here is in the sense of doing an <xsl:copy> and a recursive
apply-templates. The copy operations can be done by a suitably modified
identity template that takes the <split/> element as a parameter.
Without an explicit marker at the split point, it becomes a little more
difficult - I'm not sure how you want to identify where the split is to
occur.
If there are multiple split points, do the above to split into two, then
apply the process recursively to the second half.
Cheers, -- Abel Braaksma
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Split element with mixed , Kevin Bird | Thread | RE: [xsl] Split element with mixed , Kevin Bird |
Re: [xsl] RE: Troubling passing par, Florent Georges | Date | Re: [xsl] RE: Troubling passing par, Martin Honnen |
Month |