xsl-list
[Top] [All Lists]

Re: [xsl] toc with number with element selection

2014-02-27 13:09:37
Dear Jean-Francois,

Try something like this:

<xsl:variable name="filtered">
  <xsl:apply-templates select="/" mode="filter"/>
</xsl:variable>

Then you apply templates select="$filtered" to process the $filtered
temporary tree in place of the source document.

Take care when you do so that you do not match its root node with a
template that puts you into an eternal loop! You can avoid this by
using another mode or by seeing to it that the temporary tree has no
root node (use as="element()" on the variable declaration).

I hope this helps; ask again if this is too cryptic. This is a
powerful technique with many applications.

Cheers, Wendell


On Thu, Feb 27, 2014 at 11:15 AM, jfrm(_dot_)maurel(_at_)gmail(_dot_)com
<jfrm(_dot_)maurel(_at_)gmail(_dot_)com> wrote:
Le 27/02/2014 15:51, Wendell Piez a écrit :

Hi Wendell,

Let us know if you need any more hints.


Thank you very much for your helpful answer.

In the mean time I exprimented on the 2 solutions you suggest.

I succeded in copying the tree except pdf='no' element and numbering in a
second stylesheet but I am not sure how to execute this in one stylesheet.

Regards

--
Jean-François MAUREL
PIMECA
http://www.pimeca.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>
--~--




-- 
Wendell Piez | http://www.wendellpiez.com
XML | XSLT | electronic publishing
Eat Your Vegetables
_____oo_________o_o___ooooo____ooooooo_^

--~------------------------------------------------------------------
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>