[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] XML to Table
Subject: Re: [xsl] XML to Table From: David Carlisle <davidc@xxxxxxxxx> Date: Fri, 16 Apr 2004 17:21:46 +0100 |
> the xsl is too slow that's not surprising, given that you have multiple uses of // each of which can be read as "search the entire document". for example <xsl:for-each select="ROWSET/ROW"> at this point the current node is a ROW element. but here <xsl:for-each select="//DETAIL/COLUMN"> You ignore the current node, and search the entire document for DETAIL elements and COLUMN children You may know that the DETAIL element is always a child of the top element, but the system will not know that and searches every A B C element looking for DETAIL. Use /XML/DETAIL not //. Incidentally you shouldn't use an element name of XML as it is rserved by teh XML specification (although most systems do not complain about this) then you search the entire document again, for ROW elements <xsl:when test="//ROW[@num = $row] and just pick ones with the same number as you had above, so this part of it is just the parent element of the attribute node you have saved as $row, ie it is just <xsl:when test="$row/parent::ROW It's hard to give specific advice as I don't think you have specified exactly what the transformation is that you want to perforrm: what is your input document like It is presumably similar to your output format but differing in some way. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XML to Table, Veronica Sanchez | Thread | RE: [xsl] XML to Table, Andreas L. Delmelle |
[xsl] Select issue with some attr a, John Hamman | Date | Re: [xsl] Select issue with some at, David Carlisle |
Month |