Subject: [xsl] Muenchian keys ... plus a bit? From: DPawson@xxxxxxxxxxx Date: Wed, 22 Aug 2001 08:50:18 +0100 |
Given <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE idx [ <!ELEMENT idx (ent+)> <!ELEMENT ent (item, pge+)> <!ELEMENT item (#PCDATA)> <!ELEMENT pge (#PCDATA)> <!ATTLIST pge key (t|f) 'f'> ]> <idx> <ent> <item>content</item> <pge key="f">98</pge> </ent> <ent> <item>content</item> <pge key="f">108</pge> <pge>110</pge> </ent> <ent> <item>another</item> <pge key="f">100</pge> </ent> <ent> <item>zero</item> <pge key="t">210</pge> </ent> </idx> And indexing DTD. I want to present it as A B C .... Z (each hotlinked to the start of that letter). Then A (the anchor) aardvark, page 1,67,79 (say with page 67 ------------------- B bathtub, page 3,5,7 ------------------ Z zero, page 210 (210 in bold, its the main entry) etc. Two pass solution, first sorting, to make data entry easy. Being lazy, I don't always remember that I've already made an entry for a particular element, so there are duplicates. the <item> is duplicated, but the page numbers are not, hence the 'remove duplicates' approach of keys only partially works. Hence the Muenchian plus (I think :-). Question, how to remove the duplicate entries without losing the page numbers associated with the duplicate? I found this quite an interesting stylesheet, till I couldn't figure out the key definitions/usage, then I was stopped. I have everything except the 'remove duplicates' bit. Any help appreciated. Regards daveP **************snip here************* - NOTICE: The information contained in this email and any attachments is confidential and may be legally privileged. If you are not the intended recipient you are hereby notified that you must not use, disclose, distribute, copy, print or rely on this email's content. If you are not the intended recipient, please notify the sender immediately and then delete the email and any attachments from your system. RNIB has made strenuous efforts to ensure that emails and any attachments generated by its staff are free from viruses. However, it cannot accept any responsibility for any viruses which are transmitted. We therefore recommend you scan all attachments. Please note that the statements and views expressed in this email and any attachments are those of the author and do not necessarily represent those of RNIB. RNIB Registered Charity Number: 226227 Website: http://www.rnib.org.uk XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Convert mutiple escaped i, Jeni Tennison | Thread | Re: [xsl] Muenchian keys ... plus a, Jeni Tennison |
RE: [xsl] declaring global variable, Vadim Permyakov | Date | Re: [xsl] Passing the current node , Joerg Pietschmann |
Month |