이 내 xml 파일내 XSLT의 오류는 무엇입니까?
<html xmlns="http://www.w3schools.com">
<body>
<shelf>
<cd id="el01">
<artist>Elton John</artist>
<title>Circle of Life</title>
<country>UK</country>
<company>Spectrum</company>
<price>10.90</price>
<year>1999</year>
<description>As heard in the Lion King.</description>
</cd>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications
with XML.
</description>
</book>
</shelf>
</body>
</html>
입니다 이건 내 XSL 파일입니다
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<!-- TODO customize transformation rules
syntax recommendation http://www.w3.org/TR/xslt
-->
<xsl:template match="/">
<html>
<head>
<title>The Shelf</title>
</head>
<body>
<h1>The Shelf</h1>
<xsl:apply-templates select="shelf"/>
</body>
</html>
</xsl:template>
<xsl:template match="//shelf">
<xsl:for-each select="cd|book">
<xsl:value-of select="title"/>
</xsl:for-each>
</xsl:template>
내 출력이 브라우저에서 그냥 "선반"입니다. 내가 어디서 잘못한거야?
덕분에 .. – rgksugan
하나를 작동하지 않았다 모든 레벨에서 모든 일치하는 노드를 찾음으로써 큰 문서에서는 비효율적 일 수 있기 때문에 일반적으로'/'단축키를 사용하는 것은 좋지 않습니다. 알고 있으면 실제 경로로가는 것이 더 좋습니다. –