El mar, 20-12-2005 a las 12:25 +1100, David Crossley escribió: > Thorsten Scherler wrote: > > Thorsten Scherler escribi??: > > > Cyriaque Dupoirieux escribi??: > > > > Thorsten Scherler a ??crit : > > > > > > > > >WARNING: What I now say is pure theory!!! I have not tested it!!! > > > > > > > > > >Cyriaque Dupoirieux escribi??: > > > > >> > > > > >> I wander, > > > > >> Is there a way to include - kind of inheritance - a contract into > > > > >>another - just like we did with common stylesheets for skinned > > > > >>forrest ? > > > > > > > > > >Yes, in theory you can just do: > > > > ><xsl:include href="cocoon://prepare.contract.html.CONTRACTNAME"/> > > > > > > > > > Ok, I have tried and it works very well indeed ! > > > > (It's very important to be able to customise the content without > > > > copying > > > > the whole *content-main.ft* contract.) > > > > > > Totally agree. > > > > > > Anyway I have tried <xsl:include/> in v3 and is not working anymore. I > > > know why but no clue yet how to fix it. > > Then i wonder if this is a fundamental flaw, either here > or at Cocoon. >
It was the URIResolver and it was quite easy to fix. :) > > > The problem is for v3 that we create a stylesheet that does only resist > > > in memory and not on the disk (therefore does not have a systemID). The > > > consequences are best described on > > > http://java.oreilly.com/news/javaxslt_0801.html (Set up StreamSource to > > > resolve relative URIs) but like stated above I do not know which > > > systemID I have to set that the imports/includes got resolved. > > > > in addition: > > > > > Further I > > > think what really is missing is an appropriate URIResolver for the > > > transformer. > > > > http://download.java.net/jdk6/docs/api/javax/xml/transform/package-summary.html > > see Resolution of URIs within a transformation (on the bottom) > > > > The thing is that in cocoon we need a source resolver to resolve any > > protocol. > > It would be better to ask such in-depth stuff at Cocoon dev. > Yeah, next time if I find no solution. I am more the try and error guy it such in-depth stuff because from my experience it can take ages to explain your problem to somebody that do not know what you are trying to do. Normally by looking close enough to the cocoon-trunk sources (grep is one of my best friends) you find the answer. This time I found the TraxProcessor.java that have "... implements URIResolver". A class implementing the URIResolver needs to provide the method public javax.xml.transform.Source resolve(String href, String base). In this method we can use the normal cocoon resolver and the includes are working again in v3. :) I will check this ASAP in and thx for your feedback. salu2 > -David > > > > So I wonder how I just could use the trnasformer from the > > > sitemap. > > > > > > More information on systemID > > > http://www.onjava.com/pub/a/onjava/excerpt/java_xslt_ch5/index.html?page=5 > > > > > > salu2 > > > > > > > Salutations, > > > > Cyriaque, > > > > > > > > >salu2 > > > > > > > > > > > > -- > > thorsten > > > > "Together we stand, divided we fall!" > > Hey you (Pink Floyd) > > -- thorsten "Together we stand, divided we fall!" Hey you (Pink Floyd)