Thanks for the ideas...they may have given me a solution. I'm still not familiar enough with XSLT to really think with it or in it, but such ideas can give me a spark. I'll be more specific about the problem and lay out my quick idea for a solution. Then everyone can ridicule my hole-ridden solution and give me better ideas. =)
So we have a collection of snippets with the same key attribute. These snippets can have many types: sitemap-param component-param name description details warnings see-also etc. In addition to the type attribute, I have given them an optional name attribute. This means that a snippet of type="name" and another of type="description" can be linked together under the name="XHTML Generator" or some other such categorical designation. This linking is for the publishing aspect of things where we need to create a document that has meaningful structure and layout that can be displayed on the fly off of a search. So for publishing I had the idea to follow something of a Javadoc layout and give the document structure with a name at the top followed by a description, details, warnings, and see-also. However, elements of all types with a name attribute that isn't the null string should all be grouped together. Ex: <snippet type="name"> ... </snippet> <snippet type="description"> ... </snippet> <snippet type="see-also"> ... </snippet> <snippet type="name" name="XComponent"> ... </snippet> <snippet type="description" name="XComponent"> ... </snippet> <snippet type="sitemap-example" name="XComponent"> ... </snippet> <snippet type="name" name="YComponent"> ... </snippet> <snippet type="description" name="YComponent"> ... </snippet> <snippet type="sitemap-example" name="YComponent"> ... </snippet> Hope that clarifies the problem. Thanks, Robert