Ross Gardler wrote:

Addi wrote:

Ross Gardler wrote:

Addi wrote:



...

Once I get the WP DTD sorted out, I will be golden but related to the serializer issue, I added the serializer to my project sitemap using the cocoon example. I am testing this separately from the DTD/plugin solution above and now I am getting the page (yeah!) but in raw xhtml, not skinned. Is this related to the 0.7 raw html discussion that has been going on (that I didn't really follow)? I'm sorry that the whole process isn't really clear to me at this point so I have difficulty self-troubleshooting and I keep asking more questions everytime you answer.




That's no problem. Soon you'll know the answers and will answer other users questions. We all start somewhere.

To skin the content you need to change the sitemap entry to to:

<?xml version="1.0"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>
 <map:pipelines>
  <map:pipeline>
   <map:match pattern="resolver-*.xml">
    <map:generate src="{project:content.xdocs}resolver-{1}.xml"/>
    <map:transform

src="file:///usr/share/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl"/>
    <map:transform src="{forrest:stylesheets}/html2document.xsl" />
    <map:serialize type="xml"/>
   </map:match>
  </map:pipeline>
 </map:pipelines>
</map:sitemap>

The differences are that we are responding to a request for XML rather than HTML now. Forrest makes a request for an xml document as part of its resolving of HTML requests. That request will come here, we generate XHTMl using the docbook stylesheets, then we convert that to XDoc then the calling pipeline does the skinning.

There is a pretty good description of this process (from a differentuse case) in http://forrest.apache.org/0.7/docs/howto/howto-custom-html-source.html#Understanding%20the%20HTML-Pipeline



Thanks for that, it definitely helped. I am beginning to get a fuzzy picture of it now. :)


I *think* this will work but I've not tried it. Pleae let us know how you get on, even if it doesn't work, I'll help you debug it because this is something we have come across before now and have hoped to test out.



Well, I modified the sitemap and it didn't like the change. I now get nothing with this:
   <map:pipelines>
     <map:pipeline>
      <map:match pattern="**wp.xml">
       <map:generate src="{project:content.xdocs}{1}wp.xml"/>
       <map:transform
src="file:///C:/xsl/docbook/docbook-xsl-1.68.1/xhtml/docbook.xsl"/>
       <map:transform src="{forrest:stylesheets}/html2document.xsl" />
       <map:serialize type="xml"/>
      </map:match>
     </map:pipeline>
   </map:pipelines>

I realize that you are busy this week with the release and I am not in a rush to get this figured out, so we can come back to this when you have the time. Thanks for your help.


Comment out the second transform, what do you see when requesting "***wp.xml"

Did this and requesting **wp.xml with the first transform gives me de nada - blank, skinned page.


There is currently a bug in html2document that results in no content being displayed under certain conditions - http://issues.apache.org/jira/browse/FOR-394

I looked at this but I don't grasp it all enough for it to give me any insight.

BTW, related but aside, I finally talked to Corel Priority WordPerfect support and they agreed that they have a typo in their output but it is hardcoded in the app so I can't hack it. They have notified the dev team, so hopefully future versions (or a patch) will incorporate the change. So I will need to edit each WP "publish to XML" file and add the missing slash. (I sense a script coming on...) I'm not sure if this is really worth patching Forrest for since WP use is probably pretty limited.

- Addi