Re:Log Everything as JSON. Make Your Life Easier.
by empthought on Saturday April 28, 2012 @08:52AM
(#3902827)
There's a following:: axis in XPath which lets you look ahead to arbitrary elements. So the processor needs to load the document into memory, which of course is not streaming.
[ Parent
| on HN ]
Re:Log Everything as JSON. Make Your Life Easier.
by deno on Saturday April 28, 2012 @10:27AM
(#3903021)
I don’t see how this axis itself is a problem. Could you provide a specific example?
Re:Log Everything as JSON. Make Your Life Easier.
by empthought on Saturday April 28, 2012 @07:06PM
(#3904428)
Just /node/node2/following::* in a predicate or whatever. Perhaps you're conflating XPath-as-used with XPath-as-specified? http://msdn.microsoft.com/en-us/library/ms950778.aspx explains that you can't support all of XPath (even 1.0) and process things the way that you describe.
Re:Log Everything as JSON. Make Your Life Easier.
by deno on Saturday April 28, 2012 @11:39PM
(#3905006)
Right, they completely eliminate any buffering. That’s very strict, but you’re right. I thought you meant that there’s a subset of XPath that can’t work on anything but DOM.
Re:Log Everything as JSON. Make Your Life Easier.
by empthought on Sunday April 29, 2012 @10:35AM
(#3906049)
Yeah, that's all. The reason it's relevant is that XPath processors often value conformance over expanding the utility of their system. I didn't want someone going off and using libxslt or xalan expecting it to process things in a memory-efficient manner.