<main>
<DATA_RECORD>
<DESCRIPTION></DESCRIPTION>
<TITLE>Financial Accounting</TITLE>
<COURSE_NUM>1010</COURSE_NUM>
<MIN_CREDITS>4</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ACCT</SUBJ>
<DEPT_ID>BUSN</DEPT_ID>
<DEPT>Business</DEPT>
</DATA_RECORD>
<DATA_RECORD>
<DESCRIPTION></DESCRIPTION>
<TITLE>Managerial Accounting</TITLE>
<COURSE_NUM>1020</COURSE_NUM>
<MIN_CREDITS>4</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ACCT</SUBJ>
<DEPT_ID>BUSN</DEPT_ID>
<DEPT>Business</DEPT>
</DATA_RECORD>
<DATA_RECORD>
<DESCRIPTION></DESCRIPTION>
<TITLE>Computerized Accounting</TITLE>
<COURSE_NUM>1030</COURSE_NUM>
<MIN_CREDITS>3</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ACCT</SUBJ>
<DEPT_ID>BUSN</DEPT_ID>
<DEPT>Business</DEPT>
</DATA_RECORD>
<DATA_RECORD>
<DESCRIPTION></DESCRIPTION>
<TITLE>ELEM ACCT I ADV PLACE</TITLE>
<COURSE_NUM>1110</COURSE_NUM>
<MIN_CREDITS>4</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ACCT</SUBJ>
<DEPT_ID>BUSN</DEPT_ID>
<DEPT>Business</DEPT>
</DATA_RECORD>
<DATA_RECORD>
<DESCRIPTION></DESCRIPTION>
<TITLE>ELEM ACCT II ADV PLACE</TITLE>
<COURSE_NUM>1120</COURSE_NUM>
<MIN_CREDITS>4</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ACCT</SUBJ>
<DEPT_ID>BUSN</DEPT_ID>
<DEPT>Business</DEPT>
</DATA_RECORD>
<DATA_RECORD>
<DESCRIPTION></DESCRIPTION>
<TITLE>Personal Income Taxes</TITLE>
<COURSE_NUM>1500</COURSE_NUM>
<MIN_CREDITS>3</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ACCT</SUBJ>
<DEPT_ID>BUSN</DEPT_ID>
<DEPT>Business</DEPT>
</DATA_RECORD>
<DATA_RECORD>
<DESCRIPTION></DESCRIPTION>
<TITLE>Business Income Taxes</TITLE>
<COURSE_NUM>1510</COURSE_NUM>
<MIN_CREDITS>3</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ACCT</SUBJ>
<DEPT_ID>BUSN</DEPT_ID>
<DEPT>Business</DEPT>
</DATA_RECORD>
<DATA_RECORD>
<DESCRIPTION></DESCRIPTION>
<TITLE>PAYROLL</TITLE>
<COURSE_NUM>1600</COURSE_NUM>
<MIN_CREDITS>2</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ACCT</SUBJ>
<DEPT_ID>BUSN</DEPT_ID>
<DEPT>Business</DEPT>
</DATA_RECORD>
<DATA_RECORD>
<DESCRIPTION></DESCRIPTION>
<TITLE>Intermediate Accounting I</TITLE>
<COURSE_NUM>2010</COURSE_NUM>
<MIN_CREDITS>4</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ACCT</SUBJ>
<DEPT_ID>BUSN</DEPT_ID>
<DEPT>Business</DEPT>
</DATA_RECORD>
<DATA_RECORD>
<DESCRIPTION></DESCRIPTION>
<TITLE>Intermediate Accounting II</TITLE>
<COURSE_NUM>2020</COURSE_NUM>
<MIN_CREDITS>4</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ACCT</SUBJ>
<DEPT_ID>BUSN</DEPT_ID>
<DEPT>Business</DEPT>
</DATA_RECORD>
<DATA_RECORD>
<DESCRIPTION></DESCRIPTION>
<TITLE>MANAGERIAL ACCOUNTING</TITLE>
<COURSE_NUM>2030</COURSE_NUM>
<MIN_CREDITS>4</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ACCT</SUBJ>
<DEPT_ID>BUSN</DEPT_ID>
<DEPT>Business</DEPT>
</DATA_RECORD>
<DATA_RECORD>
<DESCRIPTION></DESCRIPTION>
<TITLE>ADMIN DCTN & TRANSC</TITLE>
<COURSE_NUM>2540</COURSE_NUM>
<MIN_CREDITS>5</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ADAS</SUBJ>
<DEPT_ID>OFAD</DEPT_ID>
<DEPT>Office Administration</DEPT>
</DATA_RECORD>
<DATA_RECORD>
<DESCRIPTION></DESCRIPTION>
<TITLE>MS Office Applications II</TITLE>
<COURSE_NUM>2510</COURSE_NUM>
<MIN_CREDITS>3</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ADAS</SUBJ>
<DEPT_ID>OFTD</DEPT_ID>
<DEPT>Admsntrtv Office Technology</DEPT>
</DATA_RECORD>
<DATA_RECORD>
<DESCRIPTION>This is an introductory course for beginners emphasizing correct pronunciation and basic vocabulary for practical use in everyday conversational situations and travel dialogues. Students with no previous study of the language are prepared to use and understand it within a limited context and basic structure. Lecture: 3 hours</DESCRIPTION>
<TITLE>Office Transcription II</TITLE>
<COURSE_NUM>2520</COURSE_NUM>
<MIN_CREDITS>2</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ADAS</SUBJ>
<DEPT_ID>OFTD</DEPT_ID>
<DEPT>Admsntrtv Office Technology</DEPT>
</DATA_RECORD>
<DATA_RECORD>
<DESCRIPTION></DESCRIPTION>
<TITLE>Office Tech & Procedures II</TITLE>
<COURSE_NUM>2530</COURSE_NUM>
<MIN_CREDITS>3</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ADAS</SUBJ>
<DEPT_ID>OFTD</DEPT_ID>
<DEPT>Admsntrtv Office Technology</DEPT>
</DATA_RECORD>
<DATA_RECORD>
<DESCRIPTION></DESCRIPTION>
<TITLE>Administrative Office Mgt</TITLE>
<COURSE_NUM>2570</COURSE_NUM>
<MIN_CREDITS>3</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ADAS</SUBJ>
<DEPT_ID>OFTD</DEPT_ID>
<DEPT>Admsntrtv Office Technology</DEPT>
</DATA_RECORD>
<DATA_RECORD>
<DESCRIPTION></DESCRIPTION>
<TITLE>Office Admin Coop Ed I</TITLE>
<COURSE_NUM>2580</COURSE_NUM>
<MIN_CREDITS>3</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ADAS</SUBJ>
<DEPT_ID>OFTD</DEPT_ID>
<DEPT>Admsntrtv Office Technology</DEPT>
</DATA_RECORD>
<DATA_RECORD>
<DESCRIPTION></DESCRIPTION>
<TITLE>Office Admin Coop Ed II</TITLE>
<COURSE_NUM>2590</COURSE_NUM>
<MIN_CREDITS>4</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ADAS</SUBJ>
<DEPT_ID>OFTD</DEPT_ID>
<DEPT>Admsntrtv Office Technology</DEPT>
</DATA_RECORD>
<DATA_RECORD>
<DESCRIPTION></DESCRIPTION>
<TITLE>MS Office Applications III</TITLE>
<COURSE_NUM>2610</COURSE_NUM>
<MIN_CREDITS>3</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ADAS</SUBJ>
<DEPT_ID>OFTD</DEPT_ID>
<DEPT>Admsntrtv Office Technology</DEPT>
</DATA_RECORD>
<DATA_RECORD>
<DESCRIPTION></DESCRIPTION>
<TITLE>Office Admin Career Dev</TITLE>
<COURSE_NUM>2620</COURSE_NUM>
<MIN_CREDITS>3</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ADAS</SUBJ>
<DEPT_ID>OFTD</DEPT_ID>
<DEPT>Admsntrtv Office Technology</DEPT>
</DATA_RECORD>
<DATA_RECORD>
<DESCRIPTION></DESCRIPTION>
<TITLE>NURSING I</TITLE>
<COURSE_NUM>1010</COURSE_NUM>
<MIN_CREDITS>7</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ADNU</SUBJ>
<DEPT_ID>ADN</DEPT_ID>
<DEPT>AD Nursing</DEPT>
</DATA_RECORD>
<DATA_RECORD>
<DESCRIPTION></DESCRIPTION>
<TITLE>NURSING II</TITLE>
<COURSE_NUM>1020</COURSE_NUM>
<MIN_CREDITS>7</MIN_CREDITS>
<MAX_CREDITS></MAX_CREDITS>
<SUBJ>ADNU</SUBJ>
<DEPT_ID>ADN</DEPT_ID>
<DEPT>AD Nursing</DEPT>
</DATA_RECORD>
</main>
私のXSLTはそうするために、各私のために働く使用して、私は取得しています。この
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
<?xml-stylesheet href="/_resources-2016/xsl/catalog.xsl" type="text/xsl"?>
<xsl:output method="html"/>
<xsl:template match ="/">
<html>
<head>
<script language="javascript" type="text/javascript"></script>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-xs-12">
<xsl:for-each select="main/DATA_RECORD">
<!--<h2><xsl:value-of select="SUBJ" /> (<xsl:value-of select="DEPT" />)</h2> -->
<ul class="verysimplelist">
<li style="font-size:150%; font-weight:400">
<xsl:value-of select="SUBJ" />
</li>
<li style="font-size:150%; font-weight:400">
<xsl:value-of select="COURSE_NUM"/>
- </li>
<li style="font-size:140%; font-weight:400; font-style:italic">
<xsl:value-of select="TITLE"/>
</li>
<li style="font-size:150%; font-weight:400">
(<xsl:value-of select="MIN_CREDITS"/>
Credits)</li>
</ul>
<p>
<xsl:value-of select="DESCRIPTION" />
</p>
</xsl:for-each>
</div>
</div>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
のように見えるように私のXMLに見えるXSLT
を使用して、私のXMLを表示していますしかし、私はいくつかの追加機能が欲しいです。
アルファベット順にグループ化することをお勧めしますが、で、h2タグなどの各グループの先頭に部門名を付けてください。私はこれを働かせるように見えない。何か案は?ありがとう!
あなたは[Muenchian grouping](https://stackoverflow.com/questions/tagged/muenchian-grouping)を探しています。 – zx485
[exslt:node-set](http://exslt.org/exsl/functions/node-set/index.html)を使用すると、人生がより簡単になります。 – o11c
私はグループ化の問題のように聞こえるzx485に同意します。あなたの入力にもう2つの 'DATA_RECORD'を追加して、希望する出力例を追加できますか?これは、あなたがグループ化して並べ替えようとしているものを見るのに役立ちます。 [muenchian grouping](http://www.jenitennison.com/xslt/grouping/muenchian.html)の例を得るのはかなり簡単です。 –