El lun, 23-01-2006 a las 11:13 +1100, David Crossley escribió: > Helena Edelson wrote: > > >Helena escribi?3: > > > > > >>I am confused on getting data into xdocs content. > > >> > > >does it has to be *in* the xdocs? Or is it that is coming just > > >afterward? Is it xdocs itself, if so did you try a "simple" cinclude on > > >the xdocs (before skining)? > > > > Do you mean implement a c_include on the xdocs (before skining)? in the > > skin? > > Would need to set up some control since the content I'm trying to get > > into a document is different or not needed for each. > > Yes the include mechanisms would operate before skinning, > at the content gathering stage. > > Another way would be to create a project sitemap to add the content > (before skinning). The sitemap can deal with adding different content > for different URL patterns. > > There was a example about this recently on the mailing lists. > The user was over-riding the core *.html pipeline for certain > docs. The relevant aggregation happens around line 508 of > $FORREST_HOME/main/webapp/sitemap.xmap in forrest_07_branch > and the subsequent match. You would need to copy this to your > project sitemap and add an extra map:part for your new content > nugget. See the recent mailing list example. > > Perhaps you have some pages that need specialised content. > Another way is to add a specific match to generate the > content via your project sitemap. Here is something from > a new howto i have been developing about scraping html > from other webpages. This just operates on one specific page > but it could match a set of pages. > > <map:match pattern="asx-announce.xml"> > <map:aggregate element="watchlist-and-tables"> > <map:part src="{project:resources}/watchlist-asx.xml"/> > <map:part src="cocoon:/get-asx-announce-today"/> > </map:aggregate> > [1] <map:transform > src="{project:resources.stylesheets}/asx-announce-to-internal.xsl" /> > <map:serialize type="xml-document"/> > </map:match> > <map:match pattern="get-asx-announce-today"> > <map:generate type="html" > src="http://asx.com.au/asx/statistics/todayAnnHeaders.jsp" /> > <map:transform > src="{project:resources.stylesheets}/asx-announce-today-to-table.xsl" /> > <map:serialize type="xml"/> > </map:match> > > The stylesheet at [1] produces Forrest internal xdoc format.
...and that is the problem. As I understand her problem is that she cannot generate xdocs format. How would you generate <iframe>bla</iframe> to xdocs? Further if you have multiple formats you end up defining lots of this [1] stylesheets. > > [ snip ] > > Well, not in this instance. I was thinking about a php app, or some java > > things where there is a string config file for instance, > > allowing you to get fields into the content area (xdocs), but there is > > code controling what goes where when, which xdocs content won't. > > > > >>The only way I see is to customize both common document2html.xsl and > > >>skins document2html.xsl > > >>(very messy:reusability rather sad) > > > > > >Yes, that is why I started the work on the dispatcher aka views. Here > > >you can easily define custom business services that you can include and > > >process in your output. > > There are ways to get extra content into the xml stream > before the skinning stage, using Cocoon sitemap aggregation. > See above. Yeah, but that means you need to have valid xdocs. ... > > Is it worth waiting on this and helping to test the Dispatcher? > > I've been trying everything off an on for a while now. > > no luck yet. > > Everything that you want to do can be done with the > existing Forrest. Yeah, but it will be totally PITA doing it with skins (just my 2 cents). > > -David salu2 -- thorsten "Together we stand, divided we fall!" Hey you (Pink Floyd)