Dimitre は前に大きな助けになりました... これはパート 2 のようなものです。:)
私は頭を悩ませてきましたが、まだ見えません。
以下の xml の例のブランドを分離できるようになったので、すべてのブランドを分離できたのとほぼ同じ方法で、指定された $Brand のすべての製品タイプを分離したいと考えています。
xml の例 (多くの製品の 1 つのメンバー)...
<Product>
<Brand>Brand</Brand>
<Type>Product Type (Category)</Type>
...
</Product>
これは私が思いついたxslです。私のエラーは xsl:key の xPath 式にあると思います...
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="Brand" select="Brand"/>
<xsl:output method="html" encoding="utf-8"/>
<xsl:key name="kProdByType"
match="Products/Product/Brand[. = $Brand]" use="../Type"/>
<xsl:template match="Products">
<xsl:for-each
select="Product[generate-id() =
generate-id(key('kProdByType', Type)[1])]
"><xsl:sort select="Type" /><xsl:value-of
select="Type" />|</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
再度、感謝します!