Hi Gary,

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']/*"

Something went wrong with this expression?

Now I can bring in the document fine, but I cannot tweak this to bring in
specific element(s).

Using XInclude, it should be possible to add a xpointer expression to your url. Something like http://xxx.com/yyy#zzz where zzz can be some xpath expression... Never tried, but should work..


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.

Ah, nice one. Did that just recently. I have set up a cocoon pipe that uses the html generator (which uses JTidy) and simply serializes that to xml (e.g. xhtml). I've done something like the following:


<map:match pattern="get-html/**">
  <map:generate type="html" src="cocoon:/{1}"/>
  <map:serialize type="xml" />
</map:match>

<map:match pattern="get-http/**">
  <map:read src="http:/{1}"/>
</map:match>

<xi:include src="cocoon://get-html/get-http/xxx.com/yyy" parse="xml" />

(may contain some typos :-P )

Suggestions are greatly appreciated.

Cheers

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to