Jeremy, Thanks again for your reply. I have though had another thought which appears to work ;-) This involves using some of the ideas from http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=102617106411067&w=2
which basically refers to using xpointer to get a document fragment using the @search:uri attribute of the search results xml (using the SearchGenerator) e.g. <a target="_blank" href="{@search:uri}"> <xi:include href="{concat(substring-before($url, '.htm'), '.xml')}#xpointer(/news_item/heading/text())" /> </a><br /> <xi:include href="{concat(substring-before($url, '.htm'), '.xml')}#xpointer(/news_item/body/paragraph[1])" /> This appears to work. I am sure there is some reason why this isn't in keeping with SoC etc. of cocoon but I can't see why it shouldn't as the importing of other xml document fragments is done with the same xsl stylesheet as is doing the rest of the formatting. Anyway, unless I come across another reason for not doing it this way this works for me (at the moment). The only issue I have got to get to grips with now is how not to actually index the content of the index.xml file and how to make the stylesheet more generic if it doesn't find the elements pointed to by xpointer expression. Cheers for all your help (I have no doubt that this thread will come into play with what I will come across with this project!) Conrad Conrad Crampton J Software Solutions Kent Police FHQ 11 Edinburgh Square Sutton Road Maidstone Kent ME15 9BZ (01622 652869 19 2869 ---------- From: cocoon-users[SMTP:[EMAIL PROTECTED]] Sent: 19 November 2002 14:26 To: [EMAIL PROTECTED] Subject: Re: Have I got any other option than to On Tuesday, Nov 19, 2002, at 08:15 Europe/London, [EMAIL PROTECTED] wrote: > > > Jeremy, > Thanks for this, what you suggest is what I need, but it does mean > that I > have to produce a summary element for all of my documents (could be > tricky as they come out of a content management system - but that is a > different story!). > If I 'patch' LuceneIndexContentHandler myself, do I just alter the > source > code as you suggest, recompile and overwrite the existing class/ > repackage into a new jar (I don't know how to do the latter > unfortunately > but I presume I can find out)? yes, modify the file and recompile read the docs about how to compile Cocoon > The next part about having a special xslt presumably goes something > like > this... > <map:views> > <map:view name="content" from-label="content"> > <map:transform src="stylesheets/search-index.xsl"/> > <map:serialize type="xml"/> > </map:view> > right again > with a generator of > <map:generator label="content" name="file" > src="org.apache.cocoon.generation.FileGenerator"/> > if you are using files, yes, it will work with any Generator all Generators are preset with the 'content' view. I needed to get my content from a different part of my pipeline, because I use CInclude aggregation, I set up a new view for this called 'include'. my pipeline looks like this: <map:generate src="content/{res}.xml"/> <map:transform src="parts/xsl/components.xsl"> <map:parameter name="res" value="{res}"/> <map:parameter name="id" value="{id}"/> </map:transform> <map:transform type="cinclude" label="include"/> <!-- new view --> <map:transform src="parts/xsl/get-chapter-links.xsl"/> <map:transform src="parts/xsl/make-chapter-links.xsl"/> <map:transform src="parts/xsl/doc2html.xsl"> <map:parameter name="res" value="{res}"/> <map:parameter name="prefix" value="{prefix}"/> <map:parameter name="display" value="{display}"/> </map:transform> <map:serialize/> and my view looks like this: <map:view from-label="include" name="content"> <map:transform src="parts/xsl/search-filter.xsl"/> <map:serialize type="xml"/> </map:view> you can see how I have mapped the 'include' view to the 'content' view. one day the view used by the indexer will be configurable (ATM is is fixed as 'content'), so you can choose whatever view you like, directly > Am I on the right lines with this???? looks like it regards Jeremy --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>