xsl-list
[Top] [All Lists]

RE: [xsl] Selecting everything "before" and "after" a specific node

2009-04-02 15:22:47
That was it, thanks so much.

-----Original Message-----
From: Martin Honnen [mailto:Martin(_dot_)Honnen(_at_)gmx(_dot_)de] 
Sent: Thursday, April 02, 2009 1:49 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Selecting everything "before" and "after" a specific
node

Harvey, Paul wrote:

So I'm trying to use an identity template to kick of the processing.
Then I have a template to match WRAPPER, which contains your stuff,
only I'm attempting to constraint it operate on the value of the
variable $sub-tree, defined as:

<xsl:variable name="sub-tree" select="/A/WRAPPER"/>

<xsl:template match="WRAPPER">
      <WRAPPER>
              <BEFORE>
                      <xsl:apply-templates select="$sub-tree"
mode="before"/>

I think you simply want
   <xsl:apply-templates mode="before"/>
here to process all child nodes of the WRAPPER element in mode="before".

              <BEFORE>
              <PULLED>                
                      <xsl:copy-of select="$this"/>
              <PULLED>
              <AFTER>
                      <xsl:apply-templates select="$sub-tree"
mode="after"/>

Then here
                   <xsl:apply-templates mode="after"/>
to process all child nodes of WRAPPER in mode="after".


-- 

        Martin Honnen
        http://JavaScript.FAQTs.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>
--~--