Subject: Re: [xsl] Ideas for creating quotation collection From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx> Date: Mon, 20 Sep 2004 19:53:48 -0400 |
I have my quotations in a XML-file that looks like this: <coll> <quote> <line>The man who does not read books has no advantage over the man that can not read them.</line> <source>Mark Twain</source> </quote> </coll>
After the first pass it should be something like <coll> <quote category="Mark Twain"> <line>The man who does not read books has no advantage over the man that can not read them.</line> <source>Mark Twain</source> </quote> </coll>
With this additional information in place I want to generate a XHTML-file like this:
[html-stuff snipped] <h2 id="Mark_Twain>Mark Twain</h2> <blockquote> <p>The man who does not read books has no advantage over the man that can not read them.</p> </blockquote>
Just some general thoughts from a non-expert who sometimes grapples with this sort of stuff.
First, can you not clean up your XML so you don't have to worry about the case-sensitivity? How about, for example, an id for each name -- where you have code like <source idref="twain">Mark Twain</source> -- and then group by id?
With respect to how to code this, the grouping support in XSLT 2.0 is certainly useful for this sort of thing. I got some help from Jeni Tennison a few weeks back on this issue, in a thread called "regexs, grouping (?) and XSLT2?" The problem I had was more complex, but you could probably adapt it.
I don't really see why you need multiple passes, but maybe I'm not understanding right.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Ideas for creating quotat, J.Pietschmann | Thread | Re: [xsl] Ideas for creating quotat, Steffen Glückselig |
Re: [xsl] flatten tree, Jan Limpens | Date | Re: [xsl] Release Date vs. Highligh, Jan Limpens |
Month |