Subject: RE: [xsl] Count() nodes ?? From: Dipesh Khakhkhar <dkhakhkh@xxxxxxxxxxxxxxx> Date: Wed, 17 Sep 2003 11:00:28 -0400 |
Hi, Thanks to all for replying for this question. Yeah Mike you are absolutely right, the context node was in a different document. Actually I am reading two xml files and few node names in that are same and I was goofing there. I didn't got your point fo this "Incidentally, using //Root rather than /Root to access the document element is appallingly inefficient." I am reading some doucment in the variable like this. <xsl:variable name="IntermediateXmlFile" select="someXmlFile.xml"/> Then i am accessing count of some nodes like this. <xsl:variable name="nodeCount" select="count($IntermediateXmlFile/Root/FixedNodes/Node/Subnode)" Will this be inefficient ?? If you please tell me it will be very helpful to me as I will be doing this many times as my input file is of GBs. Thanks!! Regards, Dipesh Date: Wed, 17 Sep 2003 04:43:10 +0100 From: "Michael Kay" <mhk@xxxxxxxxx> Subject: RE: [xsl] Count() nodes ?? I don't know why you are getting zero as the answer. Perhaps the context node is in a different document? Or perhaps there is a default namespace in force? Or perhaps there is some silly spelling mistake in the path? Can you supply a complete stylesheet and source document to reproduce the problem? You have been given several answers to this question that essentially suggest using trial and error to solve the problem. That's not a good way of getting to the bottom of the problem here. Incidentally, using //Root rather than /Root to access the document element is appallingly inefficient. Michael Kay XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Count() nodes ??, Koteswararao Mogili | Thread | RE: [xsl] Count() nodes ??, Wendell Piez |
Re: [xsl] Authority For Western Lin, W. Eliot Kimber | Date | RE: [xsl] Applying templates to a m, Passin, Tom |
Month |