cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aurélien DEHAY>
Subject Re: XInclude and CInclude
Date Tue, 22 Feb 2005 16:23:19 GMT
Schultz, Gary - COMM wrote:
> I have cinclude working to bring in external source. I now need to solve two
> more problems. 
> Problem 1:
> I can bring in entire documents, but I cannot get specific element(s). I was
> getting empty element, but used the following found on the Cocoon wiki
> select="//*[local-name()='html']/*"
> Now I can bring in the document fine, but I cannot tweak this to bring in
> specific element(s). 
> Problem 2:
> I tried bringing into an xml document an external source that is html. I use
> the default generator which is set to xml. I believe I need to bring in the
> resource, JTidy, and serialize as xml before using in the cinclude. I've
> tried some things based on what I have seen in the Cocoon samples, but
> nothing works. I'm at a loss as to where I should go from here.
> Suggestions are greatly appreciated.

Don't know about problem 1, but it may help to use xpointer, maybe.
For 2), I suppose the solution is to:

create a pipeline for serializing the html to xml:
<map:match pattern="name_toxml">
   <map:generate type="html" src="http://your_url"/>
   <map:serialize type="xml"/>

and use the pseudo-protocol cocoon:/ in the src of your cinclude element.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message