xsl : for-each를 중첩 할 때 문제가있는 xml 파일을 사용하고 있습니다.xsl 중첩 루프 오류
XML 파일 :
<?xml version='1.0' encoding='utf-8'?>
<calibredb>
<record>
<title sort="Demon Under the Microscope, The">The Demon Under the Microscope</title>
<authors sort="Hager, Thomas">
<author>Thomas Hager</author>
</authors>
</record>
<record>
<title sort="101 Things Everyone Should Know About Math">101 Things Everyone Should Know About Math</title>
<authors sort="Zev, Marc & Segal, Kevin B. & Levy, Nathan">
<author>Marc Zev</author>
<author>Kevin B. Segal</author>
<author>Nathan Levy</author>
</authors>
</record>
<record>
<title sort="Biohazard">Biohazard</title>
<authors sort="Alibek, Ken">
<author>Ken Alibek</author>
</authors>
</record>
<record>
<title sort="Infectious Madness">Infectious Madness</title>
<authors sort="WASHINGTON, HARRIET">
<author>Harriet A. Washington</author>
</authors>
</record>
<record>
<title sort="Poetry Will Save Your Life">Poetry Will Save Your Life</title>
<authors sort="Bialosky, Jill">
<author>Jill Bialosky</author>
</authors>
</record>
</calibredb>
XSL은 :
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>My Calibre Collection</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th>Title</th>
<th>Author</th>
</tr>
<xsl:for-each select="calibredb/record">
<tr>
<td><xsl:value-of select="title" /></td>
<td><xsl:for-each select="authors"><xsl:value-of select="author" /></xsl:for-each></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
여러 저자가있는 경우, 루프가 더 계속 실패 할 것으로 보인다.
누구나 내게 xsl을 올바르게 포맷하는 방법에 대한 제안을 줄 수 있습니까?
감사합니다.