Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 14416 invoked from network); 20 Jul 2006 08:28:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Jul 2006 08:28:25 -0000 Received: (qmail 27753 invoked by uid 500); 20 Jul 2006 08:28:19 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 27683 invoked by uid 500); 20 Jul 2006 08:28:19 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 27672 invoked by uid 99); 20 Jul 2006 08:28:18 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jul 2006 01:28:18 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of andrewmadu@gmail.com designates 64.233.182.186 as permitted sender) Received: from [64.233.182.186] (HELO nf-out-0910.google.com) (64.233.182.186) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jul 2006 01:28:18 -0700 Received: by nf-out-0910.google.com with SMTP id l36so196232nfa for ; Thu, 20 Jul 2006 01:27:56 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=KjcMHw9EtUEVwgujk5f7jPONreKF1J07hxARVwCg9WalEx81IIuTgs7/lxWvbQyC1YVbh228N+Z7tnu2tOJGx+Zc2OB0kPBobLEUtPi42T+eHTBXYj5k82IvCaeUm/5x2GaM+Y8SUB7oP5ldYIdbiCHL/xBzCXHCehM07NGINOA= Received: by 10.78.151.15 with SMTP id y15mr187401hud; Thu, 20 Jul 2006 01:27:56 -0700 (PDT) Received: by 10.78.151.7 with HTTP; Thu, 20 Jul 2006 01:27:56 -0700 (PDT) Message-ID: Date: Thu, 20 Jul 2006 09:27:56 +0100 From: Andrew To: users@cocoon.apache.org Subject: Re: XSL: match all elements except one section... node()[not(self::login_fields)] In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_90752_11327936.1153384076552" References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_90752_11327936.1153384076552 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Any ideas anyone? regards Andrew On 19/07/06, Andrew wrote: > > Hi, > I have an xsl template for which I wish to match (process) all elements in > the document except one: > > node()[not(self::login_fields)] > > I have placed this at the bottom of my xsl document. What am I wishing to > achieve you ask? Well I have 2 stylesheets transformations in a sitemap > pipe. The first xsl document contains the section I want ignored, and the > second, forms-samples-styling.xsl, is the document I want to handle the > transformation of the section ignored in the first xsl document. Clear?!? My > sitemap looks like: > > > > // > This is the xsl doc containing the section > type="cinclude"/> // I want transformed by > forms-samples-styling > > > > > So my xsl document, style/{2}.xsl looks like: > > > xmlns:xsl=" http://www.w3.org/1999/XSL/Transform" > xmlns:cinclude="http://apache.org/cocoon/include/1.0"> > > > > ... > > > > cellpadding="0"> > .......... > > > //I don't want this transformed here! > >
> > >
> > > > > > > > > > > > > > >
> > When I load the page the section I don't want processed is still being > processed within the document it is contained in, what am I missing here? > > regards > > Andrew > ------=_Part_90752_11327936.1153384076552 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Any ideas anyone?

regards

Andrew

On 19/07/06, Andrew <andrewmadu@gmail.com> wrote:
Hi,
I have an xsl template for which I wish to match (process) all elements in the document except one:

node()[not(self::login_fields)]

I have placed this at the bottom of my xsl document. What am I wishing to achieve you ask? Well I have 2 stylesheets transformations in a sitemap pipe. The first xsl document contains the section I want ignored, and the second, forms-samples-styling.xsl, is the document I want to handle the transformation of the section ignored in the first xsl document. Clear?!? My sitemap looks like:

                <map:generate type="jx" src="jx/{2}.jx"/>
                <map:transform type="browser-update"/>
                <map:transform type="xslt-saxon" src="style/{2}.xsl"/> // This is the xsl doc containing the section
                <map:transform type="cinclude"/>                                // I want transformed by forms-samples-styling
                <map:transform type="i18n" />
                <map:transform src="template-style/forms- samples-styling.xsl"/>


So my xsl document, style/{2}.xsl looks like:

<?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
        xmlns:xsl=" http://www.w3.org/1999/XSL/Transform"
        xmlns:cinclude=" http://apache.org/cocoon/include/1.0">
        <xsl:template match="/">
          <html>
                <head>
                    <title>...</title>
                </head>
               
            <body>
             <table width="1024" border="0" cellspacing="0" cellpadding="0">
                  ..........
                  <tr>
                    <td> <xsl:apply-templates select="//login_fields"/></td> //I don't want this transformed here!
                  </tr>
                </table>
</body>
</html>
</xsl:template>

<xsl:template match="login_fields">
    <xsl:apply-templates/>
</xsl:template>

<xsl:template match="*">
      <xsl:element name="{local-name()}">
            <xsl:apply-templates select="@*|xmlns|node()[not(self::login_fields)]"/>
      </xsl:element>
</xsl:template>

<xsl:template match="@*|text()">
      <xsl:copy/>
</xsl:template>
</xsl:stylesheet>

When I load the page the section I don't want processed is still being processed within the document it is contained in, what am I missing here?

regards

Andrew

------=_Part_90752_11327936.1153384076552--