On Mon, Jul 19, 2010 at 3:17 PM, Raul Miller <[email protected]> wrote: > Given an xpath and an xml document, I would like to create the bit > vector which selects the characters from the xml document which > correspond to text which would be selected by that xpath. Or I could > probably live with a boxed list of the selected items.
Speaking of which, to go from the first representation to the second, does anyone have anything better than: st=. 0 1 E. 0,[ bv=. st +. 0,[ bl=. (bv # st) <;._1 bv # ' ',] bparse=: bl f. Example use: (e.&(64}.a.) bparse ]) 'this is a test' (given a selection vector and a list, it returns the selected elements from the list, boxed, with contiguous elements from the original list) Thanks, -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
