0
Dimitre는 큰 도움이었습니다 ... 이것은 다소 파트 2와 비슷합니다. :)XSLT 그룹화 계속 - xPath 문제?
나는 내 머리를 부숴 먹었고 여전히 보지 못했다.
아래 XML 예제의 브랜드를 분리 할 수있게되었으므로 이제는 모든 $ {{{{{{{{{{{{{{{{{{{}}} 브랜드.
XML 예제 (많은 제품 중 하나 개 회원) ...
<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>
다시 한번 감사드립니다!
BAMM을! 감사!!! –
@ 짐머 : 당신은 건강합니다! –