Andy Black wrote: > I've successfully made some macros that provide a pop-up menu (via pick) > to allow a user to select from a set of ID attributes. I'd like to be > able to sort the list, though, instead of having them appear in their > document order. > > That is, is there a way to sort the results returned by a get command > such the one below? > > <command name="setExample"> > <macro> > <sequence> > <pass> > <command name="putAttribute" > parameter="[implicitElement] num"/> > </pass> > <get expression="join(//example/@num, ' ')"/> > <command name="pick" parameter="Example false %_"/> > <command name="putAttribute" parameter="[implicitElement] > num %_"/> > </sequence> > </macro> > </command> >
There is currently no *easy* way to do this. If you are interested, we could add to next release (the one atfer v3.4) a variant of command "pick" which would support autocompletion (supports autocompletion ==> needs to sort its strings).

