Lists Home |
Date Index |
From: "Miles Sabin" <firstname.lastname@example.org>
> Jeff Rafter wrote,
> > XPath comes up here and came up in several of the other responses.
> > Perhaps someone could answer what class of XPaths, if known prior to
> > document parse, can not be satisfied during the document parsing?
> Often it's not so much the class of XPaths that can be matched during a
> forward parse with no (or limited) state that cause trouble. Often it's
> what you want to do with the matches when you've got them. For example,
> if you need to generate output from the matches in some sorted order,
> then no amount of cleverness on the input side is going to allow you to
> do without preserving all matches until the arrival of the last.
You only need to preserve the sort-keys to the matches. You can generate them
all as (external or internal) entities (or whatever inclusion mechanism you are
using) and then output the entity references in sorted order.
The same goes for including data before it has been encountered.