XMLに新しく、XMLドキュメントを作成し、Visual Studioを使用してスキーマを自動生成しました。私は独自のスキーマを作成していました。私の質問は、私が実装することができる欠陥や可能性のある改善ですか?タイプ、要件、発生の検証があり、あなたが経験したことを聞いてみるのは好奇心旺盛です。XML Schema/XML Doc構造 - 正しく書かれています
XML
<?xml version="1.0" encoding="utf-8" ?>
<university>
<lesson id="ms434">
<subject>Biology</subject>
<maintopic name="Human Biology">
<subtopic>Enlarge Hearts</subtopic>
<subtopic>Heart Valves</subtopic>
</maintopic>
<content>
<sentance>Very long sentance one</sentance>
<sentance>Very long sentance two</sentance>
<sentance>Very long sentance three</sentance>
</content>
</lesson>
</university>
スキーマ
<?xml version="1.0" encoding="utf-8"?>
<xsl:template match="@* | node()">
<html>
<body>
<h1>Professional Training Facilities</h1>
<p>
<strong>University: </strong>
<xsl:for-each select="university/lesson">
<xsl:value-of select="subject"/>
</p>
<br/>
<p>
<strong>Main Topic: </strong>
<xsl:value-of select="maintopic=name"/>
</p>
<br/>
<p>
<strong>Sub Topics: </strong>
<xsl:for-each select="maintopic">
<p>
<xsl:value-of select="subtopic"/>
</p>
</xsl:for-each>
</p>
<p></p>
<strong>Content:</strong>
<xsl:for-each select="content">
<p>
<xsl:value-of select="sentance"/>
</p>
</xsl:for-each>
</xsl:for-each>
<br/>
</body>
</html>
</xsl:template>
私はスキーマを手作業でほぼ完成させてしまったので、コード生成量が少なくなったと確信しています。
編集:最初のステートメントでforeachエラーが発生しましたが、修正に取り掛かっていますが、それは問題ではありません。