Stumped on select/filter order...

wxdqz

New Member
I have to write an XSL filter that will allow me to return a subset of XMLfrom a document, not transforming, but only extracting and returning whatis needed under the same format.I first found problems with sucessfully copying the actual XML out of thedocument, but MSDN has an short article that illustrates this concept prettywell at <!-- m --><a class="postlink" href="http://msdn.microsoft.com/xml/xslguide/xsl-xform-copy.aspI">http://msdn.microsoft.com/xml/xslguide/ ... -copy.aspI</a><!-- m --> used a part of their code that does a recursive copy... and it works nicely,although I would have been able to write it myself, so now I have segmentthat will take me a while to understand, unfortunately I need to get movingon this asap.My problem is that I don't understand how I can process teh XML in a particularorder, where each select works on the results returned by its predecessor.For instance, I need to start at the highest level, and filter for parameterX, then filter teh results of that using parameter Y in my next check, andso on...How do I go about starting something like this... my comments in my XSL scriptsort of outline what I'd like to do, but not sure how.Thanks,kris<?xml version='1.0'?><xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"><!-- filter by the service type specified --><xsl:template match="/"><xsl:apply-templates select="Service_Def/Body/Services/Service[ServiceType='User']"><!-- recursive apply found @ msdn.microsoft.com/xml/xslguide/xsl-xform-copy.asp--><xsl:template><xsl:copy><xsl:apply-templates select="@* | * | comment() | pi() | text()"/></xsl:copy></xsl:template></xsl:apply-templates><!-- now I need to check for the correct ConnectionSpeed within the resultsabove --></xsl:template></xsl:stylesheet>
 
Back
Top