<snip/>
> 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.
>
Unless I',m missing something that looks like a simple two order sort
should work:
<xsl:for-each...
<xsl:sort select="@name"/>
<xs:sort select='@type"/>
You could also try playing tricks with concatinating the attributes:
<xsl:for-each...
<xsl:sort select="concat(@name", '-', @type)"/>
Depending on what you choose as the attribute separator (the dash
'-', above) you can then either force the elements without a name
attribute to come first or last...
--
Peter Hunsberger