Subject: RE: [xsl] Filtering a node-set From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Thu, 10 Jan 2008 16:27:24 -0000 |
> <xsl:variable name="boxSize" select="'0.002'"/> > > <xsl:for-each select="$elements"> > <xsl:variable name="top" select="@lat + 90 + > $boxSize "/> > <xsl:variable name="bottom" select="@lat + 90 - $boxSize"/> > <xsl:variable name="left" select="@lon + 180 "/> > <xsl:variable name="right" select="@lon + 180 + $boxSize > +$boxSize"/> > <xsl:if test="count($elements[(@lon+180) < $right and > (@lon+180) > $left and (@lat+90) < $top and (@lat+90) > > $bottom])=0"> > <xsl:copy-of select="."/> > </xsl:if> > </xsl:for-each> > XPath 1.0 is not relationally complete (XPath 2.0 is). You're doing a join here which, I beleive, sits in the subset of predicate calculus that falls outside the boundaries of what XPath 1.0 can do. This was the reasoning that led us to introduce the "for" expression and range variables into XPath 2.0, despite many people saying it added unnecessary complexity. So you can't do it in XPath 1.0, and without the node-set extension, I don't think you can do it in XSLT 1.0 either. Michael Kay http://www.saxonica.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Filtering a node-set, David Carlisle | Thread | RE: [xsl] Filtering a node-set, George James |
RE: [xsl] XSLT 2.0 Multi-level gro, Michael Kay | Date | RE: [xsl] Declaring more than one t, Michael Kay |
Month |