[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XML Performance in a Transacation and recursion
thanks for your responses i've looked at this a bit more and i'm now very suspicious that calling a template with parameters is actually the culprit. anyway i'll post the examples somewhere in the next day or so (workload is killing at the moment). regards rick Daniel Veillard wrote: >On Mon, Apr 03, 2006 at 01:15:31AM +0100, Rick Marshall wrote: > > >>i've found the performance problem, and it ties together with the >>discussion on recursion. >> >>here's the problem - the stylesheet vocabulary is used to write a >>postscript program. but postscript strings can't contain '(' or ')' (the >>delimiters for a postscript string). >> >>so every output string has to be parsed and the parentheses escaped with >>a '\'. >> >>we have no control over the source of the documents so i tried the >>recursive examples for substituting one string with another through a >>string. eg "ABC(DEF" ends up as "ABC\(DEF" and "AB(DEF)GHI()JK(" ends up >>as "AB\(DEF\)GHI\(\)JK\(". >> >>i've solved my performance problem for the moment by preprocessing the >>input with sed instead. >> >>but i'm not happy because sed has no knowledge of the dom and blindly >>applies the transformation, instead of only applying it to the content >>of elements. >> >>so here's a real challenge - write a template for the above >>transformation with an example on how to call it; i'll put it into the >>style sheet and test it against the examples and we'll find out what >>techniques are linear or better and what ones aren't. >> >>the solution (in this case) must work with xsltproc. >> >>currently on a 410k input document 41 of the 43 seconds of processing >>time is taken up by the string escaping function. >> >>writers of xsl processors can then compare their performance results >>over the various techniques as well. >> >> > > A Mike pointed this is probably not the best place to ask. >Seems what you need is the EXSLT string replace function, in general >XSLT-1.0 is good for manipulating structure and very poor for manipulating >content. > http://www.exslt.org/str/functions/replace/index.html > >However exslt:replace is not yet implemented in libexslt, though based >on existing examples and C knowledge it should be close to trivial. >One way to get this forward is to just implement it, which would be >best done by contacting the appropriate mailing-list (just run xsltproc >without any input to get the informations). > >Daniel > > > begin:vcard fn:Rick Marshall n:Marshall;Rick email;internet:rjm@z... tel;cell:+61 411 287 530 x-mozilla-html:TRUE version:2.1 end:vcard
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|