We have an application that needs to generate html from xml input using
xslt. It is mostly straightforward, but there is a twist that has currently
been solved with an ugly two-pass approach. Is there a better way?
Consider something like this
In other words, a bulleted list in a document but with arbitrary portions of
the document possibly excluded by a filtering mechanism. In order to
generate html, the first instance of the bullet element has to generate <ul>
and the last </ul> in addition to <li>. But whether a bullet element is
first or last depends on the filter. The current implementation first
processes the whole document for filter selection and then passes it again
to produce the list logic. Can this be done in one pass? The writers see
no need to create an extra element level to specify the list itself as they
have no other use for this structure.
Thanks in advance for any advice.