[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook-apps] Glossary sorting in Japanese
I just committed the fixes to svn, so it will be in the next release or in the snapshot xsls immediately. In addition to the sortas thing, I noticed that it would missort terms where there is leading whitespace (e.g. <glossterm> foo</glossterm>), so I added a normalize-space() to deal with that. David > -----Original Message----- > From: Akagi K [mailto:akobayashi@valista.com] > Sent: Monday, December 31, 2007 10:59 AM > To: docbook-apps@lists.oasis-open.org > Subject: RE: [docbook-apps] Glossary sorting in Japanese > > > Thanks David for giving me the details. I amended the > glossary.xsl as you said (and nothing else) and it sorted the > glossary terms according to their sortas attribute set in > Hiragana. Wonderful! > > FYI, the Katakana terms without the sortas values are sorted > to appear before any of the terms with the Hiragana sortas values. > > Which version of docbook_xsl will the debugged glossary.xsl be in? > We are using docbook_xsl_1.72.0 and for the moment we may > just replace the glossary.xsl. > > Many Thanks also to Jirka for enabling this in the first place. > Akagi > > > David Cramer (Tech Pubs) wrote: > > > > Actually, the glossentry element already takes a sortas attribute: > > http://docbook.org/tdg/en/html/glossentry.html > > but it appears that the xsls aren't currently using it. You > should be > > able add the Hiragana or Katanakana versions to the sortas on the > > glossentry and then do this in the templates from > glossary.xsl in your > > customization layer (using the same concat trick from > > autoidx-kosek.xsl and autoidx-kimber.xsl): > > > > <xsl:sort lang="{$language}" select="translate(concat(@sortas, > > glossterm[not(parent::glossentry/@sortas) or > > parent::glossentry/@sortas = '']), &lowercase;, &uppercase;)"/> > > > > Instead of the current: > > > > <xsl:sort lang="{$language}" select="translate(glossterm, > &lowercase;, > > &uppercase;)"/> > > > > This line appears more than once, so change them all. This > is a bug in > > the xsls, so please log it at sourceforge if it's not there > already. I > > would love to see the kosek and kimber approaches applied to the > > glossary too for grouping glossterms into glossdivs in the same way > > indexterms are automatically grouped into indexdivs. > > > > > > Also, I'm surprised by the need to translate all the > characters to the > > same case. Is that really required? > > > > David > > > >> -----Original Message----- > >> From: Akagi K [mailto:akobayashi@valista.com] > >> Sent: Tuesday, December 18, 2007 12:10 PM > >> To: docbook-apps@lists.oasis-open.org > >> Subject: Re: [docbook-apps] Glossary sorting in Japanese > >> > >> > >> Further to the glossary sorting issue in Japanese, we are > using the > >> id for glossentry and notice that they DO GET SORTED, but in an > >> arbitrary manner. > >> Is this a fluke, or is there some sort order that is > influencing it? > >> What might that be, so that I can edit it? > >> > >> Thanks > >> Akagi > >> > >> > >> Jirka Kosek wrote: > >> > > >> > Akagi Kobayashi wrote: > >> > > >> >> The Kosek method can be used successfully to sort Hiragana and > >> >> Katanakana characters (I'm sure). I have added those after the > >> >> alphabet to the sort list. Attaching the test xml fyi. > >> > > >> > I haven't received file, but I would be happy to add it > >> into standard > >> > distribution. You can send it to me off-list. > >> > > >> >> Before I look into the Kimber method - I have an idea > for sorting > >> >> words in kanji. > >> >> > >> >> Could you tell me whether using the glossentry id= link > >> might work? > >> >> This is explained in Chapter 16 - Linking to a glossary entry > >> >> http://www.sagehill.net/docbookxsl/LinkToGlossary.html > >> >> So the kanji word will be set as the glossterm; and its > reading in > >> >> hiragana will be set as the glossentry id. > >> > > >> > You can do this, but stylesheets doesn't support sorting of > >> glossterms > >> > based on id values, so you will have to customize stylesheets. > >> > > >> > I think that adding sortas attribute to glossterm is the > >> right solution. > >> > If time permits we will discuss this request during today's > >> DocBook TC > >> > meeting. > >> > > >> > -- > >> > > ------------------------------------------------------------------ > >> > Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz > >> > > ------------------------------------------------------------------ > >> > Professional XML consulting and training services > >> > DocBook customization, custom XSLT/XSL-FO document processing > >> > > ------------------------------------------------------------------ > >> > OASIS DocBook TC member, W3C Invited Expert, > ISO/JTC1/SC34 member > >> > > ------------------------------------------------------------------ > >> > Want to speak at XML Prague 2007 => http://xmlprague.cz/cfp.html > >> > > >> > > >> > > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/Re%3A-Glossary-sorting-in-Japanese-tp101 > > 76176p14402503.html > >> Sent from the docbook apps mailing list archive at Nabble.com. > >> > >> > >> > --------------------------------------------------------------------- > >> To unsubscribe, e-mail: > docbook-apps-unsubscribe@lists.oasis-open.org > >> For additional commands, e-mail: > >> docbook-apps-help@lists.oasis-open.org > >> > >> > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > docbook-apps-unsubscribe@lists.oasis-open.org > > For additional commands, e-mail: > > docbook-apps-help@lists.oasis-open.org > > > > > > > > -- > View this message in context: > http://www.nabble.com/Re%3A-Glossary-sorting-in-Japanese-tp101 76176p14559671.html > Sent from the docbook apps mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: > docbook-apps-help@lists.oasis-open.org > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]