[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] XSLT Stylesheet Exclude Parental Search Results?
- From: David Carlisle <davidc@nag.co.uk>
- To: xml-dev@lists.xml.org
- Date: Mon, 26 Jan 2009 13:35:10 GMT
> I managed to locate only those nodes in
> "/ns:html/ns:body/ns:div[@id='content']/ns:p/ns:strong" by
> using xsl:if followed by the xsl:choose nested for each
> element. This will ensure that XSLT will not find anything above this
> node.
I can't guess what your code looks like from this description but XSLT
won't find anything above that node if you don't apply templates to
nodes above there.
Which is what I suggested the first time, admittedly when cutting and
pasting the xsl:if into a for-each I left in the test attribute.
You don't want to process all nodes and then have some strange test on
each one to decide if you want to be there, just process the nodes that
you need.
something like
<xsl:for-each select="/ns:html/ns:body/ns:div[@id='content']/ns:p/ns:strong">
....
David
________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]