[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[xsl] Re: Getting a NodeList from a NodeList
Subject: [xsl] Re: Getting a NodeList from a NodeList From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx> Date: Tue, 1 Jul 2003 20:07:28 +0200 |
Generally, this cannot be done within the documented object model of the MSXML2 namespace (MSXML4.dll). You can *easily* do this in XSLT. ===== Cheers, Dimitre Novatchev. http://fxsl.sourceforge.net/ -- the home of FXSL "Allistair Crossley" <Allistair.Crossley@xxxxxxx> wrote in message news:5684A7E6FB10504393A2806C1F4C021017CB36@xxxxxxxxxxxxxxxx > Hi > > I am using XSL and MSXML 4 to do some reports. I have a main body of XSL which selects from an XML tree all employees who belong to a particular department which is a list being looped over already. The current department value is stored in $deptName > > <xsl:for-each select="mycomp:getFilteredEmployeeRecords(//employee[./@department = $deptName])"> > > Here, I am passing the result of "all employees in the current department" to a MSXSL:SCRIPT function where I want to filter the node list even more and return it. > > Let's say I want a node list of all employees called John from the node list that I pass into the function to come out. > > My problem is that nodeList is a DOMNodeList and does not have what I need to select another nodeList from it...i.e Node's selectNodes. All it has is the ability to get a node. > > I want to do something like > > function getEmployeeRecords(nodeList) { > return nodeList.selectNodes("/employee[@name='John']"); > } > > The problem is that nodeList is a list of EMPLOYEE nodes. > > How can I return a nodeList from my function which is all EMPLOYEE nodes in nodeList with name = John? > > I have thought about sibling functions but I am not sure. > > Allistair Crossley > Senior Intranet Developer > QAS Ltd > Direct Dial: 020 7819 5343 > > > > <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> > ------------------------------------------------------- > QAS Ltd. > Developers of QuickAddress Software > <a href="http://www.qas.com">www.qas.com</a> > Registered in England: No 2582055 > Registered in Australia: No 082 851 474 > ------------------------------------------------------- > </FONT> > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Getting a NodeList from a Nod, Allistair Crossley | Thread | RE: [xsl] Getting a NodeList from a, cknell |
RE: [xsl] Different Colors for Alte, Americo Albuquerque | Date | Re: [xsl] Different Colors for Alte, Kevin Jones |
Month |