Guys,\r\n\r\nI know this is a XML NG, but I figured XSL would be allowed here as they are closely related.\r\n\r\nI am trying to filter out XML flows based on using an if statement for an attribute of the root element of the file. For some reason, when I use the following XSLT code with the following XML File, it seems the if statement is never seen, and the XML file is always sent through.\r\n\r\nDo you guys have any ideas on why this is? I have scoured the internet reading how-to's and examples, but still cannot get this to work. 7 hours later, I am still not sure what I am doing wrong.\r\n\r\nThe following XML File is simplified for simplicity here.\r\n\r\nTIA,\r\nDavid\r\n\r\n\r\n[CODE]XML File:\r\n\r\n<CarModel Year=2009>\r\n<A>\r\n <B>\r\n <B>\r\n</A>\r\n</CarModel>\r\n\r\n\r\n\r\nXSL File:\r\n\r\n<?xml version='1.0' encoding="ISO-8859-1"?>\r\n <xsl:stylesheet\r\n xmlns:xsl="http: ww w3 org 1999 XSL Transform"\r\n version="2.0">\r\n\r\n<xsl:template match="/CarModel">\r\n <xsl:if test="@Year=2009"> <xsl:apply-templates select="A"/> </xsl:if>\r\n\r\n</xsl:template>\r\n\r\n<xsl:template match="A">\r\n <xsl:copy>\r\n <xsl:apply-templates select="@*|node()"/>\r\n </xsl:copy>\r\n</xsl:template>\r\n</xsl:stylesheet>[/CODE]\r\n\r\nPS - the namespace for the XSL is accurate, I had to remove it here as it is considered a link.\r\n\r\nAgain, what I am trying to do is only pass through XML Files that have a Year attribute equal to 2009. Once it finds one with 2009, it should copy over the XML file exactly as it was input. Otherwise, I want nothing to pass through.\r\n\r\nMany many thanks to whomever can spare a few minutes to tell me what I'm doing wrong. It has to be something trivial.