[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: Generating an index of terms in a TEI P5 book MS
On 6/12/2016 6:26 PM, Michael Kay mike@xxxxxxxxxxxx wrote:
You say you want to build an index, but you don't say what should go
in the index.
Extracting the terms is easy enough, but what other information do
you want in the index?
For now, I just want the list of terms (which, as is probably obvious,
will be Chinese words), sorted by Unicode hex order (i.e. =
radical/stroke), if possible, with double occurrences removed.
Is there a requirement here to group multiple occurrences of the same
term?
For this particular case, I'd like to remove multiple occurrences if
possible. If not, I can do by another process.
Regards,
Chuck
On 12 Jun 2016, at 05:08, Charles Muller acmuller@xxxxxxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
Dear Colleagues,
I have a document written in TEI P5, for which I'd like to generate
an index of words tagged as <term xml:lang="zh"> occurring anywhere
throughout the <body> of the document, which means that the terms
are occurring inside of <p>, which might be under <div2>,
<div3>...<div7>.
I've been struggling with this for a few days with no success, so
must after all ask for some help. I'm presently stuck at this
stage:
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet
version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="TEI/text/body"> <html> <head/> <body>
<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> </body> </html> </xsl:template>
</xsl:stylesheet>
Any pointers would be much appreciated!
Chuck --
--------------------------- 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
--
---------------------------
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 |
Michael Kay mike@xxxxxxxxxxxx - 12 Jun 2016 09:26:27 -0000
- Charles Muller acmuller@xxxxxxxxxxxxxxx - 12 Jun 2016 12:07:51 -0000 <=
|
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|