Re: [xsl] Generating an index of terms in a TEI P5 book MS

Subject: Re: [xsl] Generating an index of terms in a TEI P5 book MS
From: "Charles Muller acmuller@xxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 12 Jun 2016 12:20:11 -0000
On 6/12/2016 5:45 PM, Martin Honnen martin.honnen@xxxxxx wrote:


Otherwise it looks fine (as far as I can tell without knowing the input
format), you will need to explain what "no success" really means, if you
get an error, no output at all, the wrong sort order.

My apologies for the wrong response in my prior message.


Whether I use

     <xsl:for-each select="//term[@xml:lang='zh'] ">
       <xsl:sort select="term[@xml:lang='zh']"/>
      <p><xsl:apply-templates/><xsl:text> </xsl:text></p>
  </xsl:for-each>

or use

     <xsl:for-each select="//term[@xml:lang='zh'] ">
       <xsl:sort select="."/>
      <p><xsl:apply-templates/><xsl:text> </xsl:text></p>
  </xsl:for-each>

I get the entire content of the header and body dumped into the html output document as plain text without HTML tags.

You might want to show a small snippet of input with any namespaces
declarations included, the output you want and then one you get if you
still have problems.

The top of the document, from the top of the header, down to the first part of the <body>, looks like this:


<?oxygen RNGSchema="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng"; type="xml"?>
<?xml-stylesheet type="text/xsl" href="xsl/term-zh.xsl"?>
<?xml-stylesheet type="text/css" href="../../../xml/css/tei_oxygen.css"?>
<TEI xmlns:xi="http://www.w3.org/2001/XInclude"; xmlns:svg="http://www.w3.org/2000/svg"; xmlns:math="http://www.w3.org/1998/Math/MathML"; xmlns="http://www.tei-c.org/ns/1.0";>
<teiHeader>
<fileDesc>
<titleStmt>
<title level="m">The System of the Two Hindrances (Ijang ui)</title> <author>Wonhyo</author><respStmt>
<resp>Originally prepared by</resp>
<name>Charles Muller</name>
</respStmt>
</titleStmt><extent>section</extent>
<publicationStmt><p>Published digitally</p>


</publicationStmt>
<sourceDesc><p>No source: created in machine-readable form.</p>

</sourceDesc></fileDesc><profileDesc>
<langUsage>
<language ident="sa">Sanskrit</language>
<language ident="en">English</language>
<language ident="ja">Japanese</language>
<language ident="ko">Korean</language>
<language ident="bo">Tibetan</language>
<language ident="pi">Pali</language>
<language ident="zh">Chinese</language>
<language ident="la">Latin</language>
<language ident="cjk">Sinitic Logographs</language>
</langUsage>
</profileDesc><revisionDesc><change>&gt;<label>updated</label><date>2016-06-11</date><label>Date edited</label></change><change><label>created</label><date>2004-11-28</date><label>Date created</label></change></revisionDesc></teiHeader>
<text>
<front>
<docTitle>
<titlePart type="main">The System of the Two Hindrances (<title level="m">Ijang ui</title>)</titlePart>
</docTitle>
<docAuthor>Translation and Introduction by A. Charles Muller</docAuthor>
<docDate>June 8, 2016</docDate></front>
<body>
<div1><head>Prologue and Definition of Terminology</head>
<div2><head>Prologue</head>
<label corresp="sourceref"><ref target="hbj01-tei.html#HBJ01.0789c04">HBJ 1.789c4</ref>, WSC 321</label><p rend="passage" xml:lang="zh"><term xml:lang="zh">d: ig>)</term>e-iee%cd8i e
g>)cd: e:i+g8c d8 h>(<term xml:lang="zh">e
h=</term>c<term xml:lang="zh">ef</term>h+8icd:ff2;f7ce-f#<term xml:lang="zh">f1:f</term>c</p>



The output of the same region look like this (I think you can ignore the character corruption):


<?xml version="1.0" encoding="UTF-8"?>

The System of the Two Hindrances (Ijang ui) Wonhyo
Originally prepared by
Charles Muller

section
Published digitally


No source: created in machine-readable form.




Sanskrit
English
Japanese
Korean
Tibetan
Pali
Chinese
Latin
Sinitic Logographs

&gt;updated2016-06-11Date editedcreated2004-11-28Date created



The System of the Two Hindrances (Ijang ui)

Translation and Introduction by A. Charles Muller
June 8, 2016

Prologue and Definition of Terminology
Prologue
HBJ 1.789c4, WSC 321C$B:EC)E!EC'B>B)C%b&B-C)bb,C%Kb C%KB%C#b,bC$B8b,C)b!b9C%BB
C'B>B)C#b,BC$B:EC%b!B:C)B+bC'b:B8C#b,B C$B8b0C(B>B(C%E E8C(FB=C#b,BC%b:b:C&bBC(B+B8C)bb,C#b,BC$B:bC&KE=C&B2B;C&bB7C#b,BC%b&B-C&FB#C&B1B:C&bb!C#b,b




--

---------------------------
A. Charles Muller

Graduate School of Humanities and Sociology
Faculty of Letters
University of Tokyo
7-3-1 HongE
, BunkyE
-ku
Tokyo 113-8654, Japan

Office Phone: 03-5841-3735

Web Site: Resources for East Asian Language and Thought
http://www.acmuller.net

Twitter: @H_Buddhism

Current Thread