Re: sorting, was: Version 3.0 now available!
Brought to you by:
bs_php,
nigelswinson
From: Philipp L. <le...@hi...> - 2002-05-12 13:11:05
|
From: "Peter Robins" <php...@pe...> >.. > How do you sort that, other than in document order? > And if you add a further nnn <p> nodes - the norm in document files - how can > they be used if not in document order? In what order can the 'nodes' of, say, > a Shakespeare play be processed other than the one he wrote?! >.. Yes. And also I could imagine a dozen other cases, except my current one where I'd need it. Imagine you want to build a table-of-contents for an XHTML page. The most reasonable expression to me seems to be: //h1 | //h2 | //h3 | //h4 | //h5 | //h6 and then process this e.g. building a nested list. It's very important here that an h2 following an h1 in the original document can be understood as belonging to this h1 as a sub-heading. (I do the above in an MSXML4-based Content Management System.) |