[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: help request: incremental XSLT(-ish?) in javascript

  • From: Evan Lenz <evan@evanlenz.net>
  • To: Michael Kay <mike@saxonica.com>
  • Date: Thu, 08 Oct 2009 15:43:50 -0700

Re:  help request: incremental XSLT(-ish?) in javascript
It's probably not the environment Thomas is looking for, but I believe 
that InfoPath works this way. It uses XSLT (along with some extension 
attributes) to define a round-trip mapping between stylesheet and source 
tree. Those source-result bindings allow the processor to redraw part of 
the result without having to run the whole transformation over again. 
Chapter 10 (which I wrote) of Office 2003 XML[1] is basically a 
revserse-engineering of InfoPath's XSLT internals. I don't recall if I 
covered this optimization in the book, but I seem to recall reading 
about it.

Here's a quote I found just now: "To avoid running the entire XSLT 
transformation every time the end user enters data in a view or clicks a 
formatting control for rich text, algorithms are used to determine which 
portion of the view needs to be refreshed. Then only the relevant 
portion of the XSLT stylesheet is applied to the DOM, and the affected 
portion of the view is refreshed."[2]

Evan Lenz
http://lenzconsulting.com

[1] http://books.google.com/books?id=xYEyK_7TWP8C&pg=PA426
[2] http://msdn.microsoft.com/en-us/library/bb608310(office.11).aspx


Michael Kay wrote:
>> I want a second DOM around - an XML object.   The HTML
>> DOM for the page is related to the XML object either 
>> literally by an XSLT script or by something similar.
>> When I change the *XML DOM* - I want the HTML transformed DOM 
>> to be incrementally updated.
>>
>>     
> ...
>   
>> I am looking for a way so that if the Javascript program 
>> modifies the XML - say by adding an additional book - that 
>> the HTML DOM is automagically updated, say by inserting a new 
>> "li" element in the appropriate place.
>>
>>     
>
> Incremental transformation - only changing those parts of the output that
> are affected by a change to the input - was one of the potential benefits
> touted when XSLT was designed, and was said to be possible because of the
> declarative nature of XSLT. In practice, it hasn't been delivered. I'm sure
> it can be done in principle, as demonstrated by the "back-mapping" done by
> debugging tools, which link elements in the output to the elements in the
> input from which they were derived. But there's not much investment going
> into client-side XSLT, which might have something to do with the fact that
> it's rather hard to make a business case for such investment.
>
> Regards,
>
> Michael Kay
> http://www.saxonica.com/
> http://twitter.com/michaelhkay 
>   



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.