내 질문은 : XSLT를 사용하는 방법은 다음과 같이 표시됩니다 (아래 샘플 코드를 참조하십시오) 결과는 HTLM에 수출 될 필요가 QUOTE 태그의 총 수를 계산 : 총 6 인용이 있습니다XSLT에서 총 견적 수를 계산하는 방법은 무엇입니까?
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="text.xsl" ?>
<quotes>
<quote>Quote 1 </quote>
<quote>Quote 2</quote>
<quote>Quote 3</quote>
<quote>Quote 4</quote>
<quote>Quote 5</quote>
<quote>Quote 6</quote>
</quotes>
이미이 XSLT 코드를 시도했지만 작동하지 않습니다
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<xsl:template match="/">
<xsl:value-of select="count(//quote)"></xsl:value-of>
</xsl:template>
</xsl:stylesheet>
가이 문제를 좀 도와 주시겠습니까? 고맙습니다.
힌트 : 아마도 가장 좋은 대답을 수락 할 수 있는지 모른다 - 대답 옆에 표시되는 확인/허용 표시를 클릭하십시오. –