<ein:ProcessRequest> <ein:DocumentID>4.IPM_013407</ein:DocumentID> <ein:InvoiceNumber>12345</ein:InvoiceNumber> <ein:InvoiceType>PO</ein:InvoiceType> <ein:InvoiceDescription>LYRECO JUN 2013</ein:InvoiceDescription> <ein:SupplierName>LYRECO PTY LTD</ein:SupplierName> <ein:SupplierSiteName>E-INVOICE</ein:SupplierSiteName> <ein:POInvoice> <ein:POInvoiceItems> <ein:InvoiceNo>2331940908</ein:InvoiceNo> <ein:Amount>195.42</ein:Amount> <ein:GSTAmount>17.77</ein:GSTAmount> <ein:InvoiceDate>2013-05-01</ein:InvoiceDate> <ein:Description>Some description text</ein:Description> <ein:Quantity>1</ein:Quantity> <ein:UnitPrice>195.42</ein:UnitPrice> <ein:ExpenseType>STATIONERY</ein:ExpenseType> <ein:ProjectNumber>200363</ein:ProjectNumber> <ein:TaskNumber>11040</ein:TaskNumber> <ein:ExpenditureType>Office Supplies</ein:ExpenditureType> </ein:POInvoiceItems> ............ </ein:POInvoice> <ein:ProcessRequest>Firstly I tried the transformation of a XML message like the above but with over 2700 <POInvoiceItems> elements using XMLSpy. The result shows XQuery is much faster than XSLT when transforming this message. Roughly XQuery is 3~4 times faster.
Then I put these two transformations into one Oracle SOA application respectively and invoke the application with the same large message payload. The comparison show that under Oracle Weblogic environment there is no obvious difference between XQuery and XSLT and XSLT is even faster than XQuery. I am not quite sure what cause the different results using XMLSpy and Oracle Weblogic. Maybe it is related to the implementation of XQuery and XSLT enegines within XMLSpy and Oracle Weblogic.
Interesting finding, did you tested for some other scenarios to suggest that both are same ?
ReplyDeleteWow, i read this article and thought this cannot be the case every expert and blog has said xquery is faster and took their word for it, and this might be the case outside of Oracle Middleware, so we did a POC with a 15000 line xml, and ran through xquery and xslt and could not believe that in Oracle SOA 12c (OSB) that XSLT was faster than xquery doing the same transformation, around 25% quicker with a 15000 line xml, however when we did a 20 line xml we found that XSLT was more than 100% quicker. Amazing. Thanks for the post.
ReplyDeleteYou can find some additional analysis that i did here:
ReplyDeletehttp://jtyreman.blogspot.co.uk/2017/04/xquery-vs-xpath-performance.html