[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: [XSL] extracting a verse
Hi David,
At 03:45 PM 12/18/2002, you wrote: If you just want to get the text within verses, then there is a very simple solution with keys. Assign keys to all text nodes - the key is the concatenation of the ID of the verse that precedes the text node and the ID of the verseEnd that follows it. It's then easy to use the key to pull all the text nodes for a given verse. Thanks for bringing this up. It's a very useful approach, a version of the "levitation" method for interpolating structure into a flat sequence (which is an application of grouping in general). In the case of the requirements you cite (throw away all other markup, keep just the text nodes wrapped in their correct verses), it's the method I would prefer. Just as a footnote, it may be worth mentioning that using this technique, you don't actually need your <endVerse/> elements, since you can key each text node simply to the <verse/> element that most recently precedes it. If anyone's interested, you'll also find a thread on this problem from earlier this year, in the archives of TEI-L, under the threads "Re: Bible Markup" and "XSLT caveats (was: Re: Bible Markup)". Check out http://listserv.brown.edu/archives/cgi-bin/wa?S1=tei-l (I found the threads by searching for "flat or hierarchy"). Cheers, Wendell
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|