Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - "Chains" of xslt transformations >Thread Next - Re: "Chains" of xslt transformations Re: "Chains" of xslt transformationsTo: NULL Date: 7/6/2005 1:03:00 PM Slava Sedov wrote: > need to effectively perform 2 sequential xslt transforms on some data > ((xm1+xsl1)+xsl2) and can`t find a way to do it without intermediate > transform intermediate xml to text - i use XslCompiledTransform with > XPathDocument, is anyone know good way to pass result data after first > xslt-transformation as source data for second xslt-transformation? As XslCompiledTransform doesn't support XmlReader output, there is no such easy way. The only way that doesn't incur reparsing is transforming to XmlNodeWriter, which writes to XmlDocument. But then your next transformation will deal with XmlDocument, which is slower than XPathDocument. We (XML MVPs) are working on this problem. Another solution is to avoid double stylesheets and instead combine them into one (set mode for each template to distinguish them), then store first transformation in a variable, convert it to a nodeset and run second one. > p.s. also i am interesting about best practice to this scenario - i get > xml1, then apply xslt1 to it and in result i get another xslt2 and then > perform tranformation of xml2 using xslt2. I don`t understand why i need > store intermediate results as strings instead of storing it as XPathDocument > or at least XMLDocument. You don't have to. Transform to XmlWriter instead. -- Oleg Tkachenko [XML MVP, MCAD] http://www.xmllab.net http://blog.tkachenko.com | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
