[Webkit-unassigned] [Bug 4079] Support EXSLT with libexslt

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jul 1 12:31:43 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=4079





------- Comment #19 from m.david at xmlhacker.com  2007-07-01 12:31 PDT -------
(In reply to comment #17)
> (In reply to comment #13)
> > I will try to add a test case.
> 
> Something that would help the most are examples of actual Web sites using EXSLT
> features (as mentioned above, FF and Opera support exsl:node-set(), so I
> suppose there should be at least a few such sites?)
> 

While I need to clean up the sample XML data to make more sense (I pulled the
data from a yet to be launched site), http://test.atomictalk.org/index.xml and
http://test.atomictalk.org/index-node-set.xml will provide two samples: the
first doesn't use node-set, the second does.  

The code is checked into http://atomictalk.googlecode.com/svn/trunk/

What this does: As the XML is parsed, it looks for @@ symbols (e.g.
@@name-of-advice-element@@), looks for the advice:name-of-advice-element in the
/my:session/my:page/page:config/page:advice/advice:*, and replaces the content
of that element inline where it found the @@name-of-advice-element@@.  Of
course, each advice element can contain the name of another advice element, and
can also use conditional logic to determine if content should be replaced, and
if so with what.  Without using exsl:node-set, this is dynamically evaluated
each time the processor comes across an @@element-name@@ code block, so quite
obviously this is an expensive way to process the advice elements.  Using
node-set, the advice elements can be "pre-compiled" so it becomes a simple
matter of looking up the element name and replacing the @@element-name@@ with
the static string value of the element. 

That said, I quickly rewrote the tranformation code to accomodate the usage of
exsl:node-set() for testing purposes.  More work is needed before it will be a
good side-by-side comparison of using exsl:node-set() compared to not using it.
 At the moment it pre-compiles the advice elements but doesn't use that
pre-compiled data during the replace operation.  It's going to take quite a bit
more code rewrite to get that to work properly, so for now this is simply a way
to test whether exsl:node-set() is working properly.

I'll update this thread when the code has been rewritten in such a way as to be
a good side-by-side comparion test case for exsl:node-set().


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list