i want to combine the following...
<xsl:apply-templates
select="(data[contains(.'STOP')]/preceding-sibling::)"/>
<xsl:apply-templates
select="(data[contains(.'START')]/following-sibling::)"/>
So limiting the data to just the data inbetween
these... i noticed intersect (which looked very
useful) in XPath 2.0 but unfortunately I can only use
XPath 1.0
in addition i also wish to normalize-space within the
document before applying the templates... I can see
two ways ...running a separate xslt script first or
altering the incomming xml data before the processing
with the xslt script but was wondering if there is a
way to do it all in the same xslt script?
thanks for you help...
--- David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk> wrote:
You are applying templates to all nodes, so you need
a template
<xsl:template match="blah"/>
that says to do nothing with blah elements that
don't match your other
template.
Or simpler in this case just have a template
matching blah that does teh
trannsformation you require, and only apply
templates to the blah nodes
before stop, as I suggested earlier:
Date: 4 Aug 2005 17:08:35 +0100
From: David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk>
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
In-reply-to:
<20050804154345(_dot_)95728(_dot_)qmail(_at_)web86702(_dot_)mail(_dot_)ukl(_dot_)yahoo(_dot_)com>
(message
from ADAM PATRICK on Thu, 4 Aug 2005 16:43:45 +0100
(BST))
Subject: Re: [xsl] defining nodes to apply template
to
<xsl:apply-templates
select="blah[.='STOP']/preceding-sibling::blah"/>
David
________________________________________________________________________
This e-mail has been scanned for all viruses by
Star. The
service is powered by MessageLabs. For more
information on a proactive
anti-virus service working around the clock, around
the globe, visit:
http://www.star.net.uk
________________________________________________________________________
--~------------------------------------------------------------------
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>
--~--