On Fri, 2006-05-26 at 09:53 -0400, Sarah Skinner wrote:
> I have been using Lenya 1.2 for a few weeks now and have created a few
> custom doctypes following the instructions on the website...
> 
> The problem is that in Lenya under Site, File "New myresource Document" I
> can create a new document with the resource type: myresource but the
> DocumentID must be myresource or it will default to a resource type of
> xhtml. Obviously that means I can only use each doctype once. 
> 
> So when I create a second document of the same resource type, giving it a
> document id of myresource2, the resource type ends up being xhtml and so
it
> uses the xslt's for that resource type. I does however use the
> myresource.xml sample file that I specified.
> 
> I have been over the config files again and again. Has anyone experienced
> this before?



Josias wrote:
How do you assign the doctype in parameter-doctypes.xmap? (With the
SourceTypeAction or by URL matching?) I'm just guessing, but the problem
might be there.
If you check the files in the filesystem, do they have the correct
doctype?

If you want to post your parameter-doctypes.xmap, we may be able to help
more.



I would like to use the SourceTypeAction, but am not sure how to set that
up. I am sure that this is the problem. The doctype I am using is called
services, I believe I am trying to match it by URL, using the pipeline in
parameter-doctype.xmap...

<map:pipeline>
      <map:match pattern="*/services*.html">
        <map:generate type="serverpages"
src="../../config/parameters/default.xsp">
          <map:parameter name="value" value="services"/>
        </map:generate>
        <map:serialize type="xml"/>
      </map:match>
    </map:pipeline>




Here is what I have in parameter-doctype.xmap under components...

<map:components>
    <map:generators default="file"/>
    <map:transformers default="xslt"/>
    <map:readers default="resource"/>
    <map:serializers default="html"/>
    <map:matchers default="wildcard"/>
    <map:actions>
      <map:action logger="sitemap.action.sourcetype" name="sourcetype"
src="org.apache.cocoon.acting.sourcetype.SourceTypeAction">
        <sourcetype name="xhtml">
          <document-element namespace="http://www.w3.org/1999/xhtml"/>
        </sourcetype>
        <sourcetype name="links">
          <document-element
namespace="http://apache.org/lenya/pubs/default/1.0"/>
        </sourcetype>
      </map:action>
    </map:actions>
  </map:components>


- Thanks
Sarah




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

Reply via email to