you have an error in you components def. try this
I assume, your index.html contains html (not xml) right ?

<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>

   <map:components>
     <map:generators   default="file"/>
     <map:transformers default="xslt"/>
     <map:readers      default="resource"/>
     <map:serializers  default="html"/>
     <map:matchers     default="wildcard"/>
   </map:components>

  <map:pipelines>

    <map:pipeline>
       <map:match pattern="index.html">
         <map:read src="index.html"/>
      </map:match>
    </map:pipeline>

  </map:pipelines>

</map:sitemap>


================================================================
or try this, if your index-file has xml code in it:
i propose then, you rename the file index.html to index.xml
to be explicit:



<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>

   <map:components>
     <map:generators   default="file"/>
     <map:transformers default="xslt"/>
     <map:readers      default="resource"/>
     <map:serializers  default="html"/>
     <map:matchers     default="wildcard"/>
   </map:components>

  <map:pipelines>

    <map:pipeline>
       <map:match pattern="index.html">    <== you ask for this
         <map:generate src="index.xml"/>   <== but you process this ;-)
         <map:serialize/>
      </map:match>
    </map:pipeline>

  </map:pipelines>

</map:sitemap>



===========================================================
or make it explicit (best practice):



<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>

   <map:components>
     <map:generators   default="file"/>
     <map:transformers default="xslt"/>
     <map:readers      default="resource"/>
     <map:serializers  default="html"/>
     <map:matchers     default="wildcard"/>
   </map:components>

  <map:pipelines>

    <map:pipeline>
       <map:match pattern="index.html">
         <map:generate type="file" src="index.xml"/>
         <map:serialize type="html" />
      </map:match>
    </map:pipeline>

  </map:pipelines>

</map:sitemap>


regards, hussayn


arnaud wrote:
i dont understand (im thinking im stupid)
it doesnt work too

(im using tomcat 4.1.12, jdk sun 1.4.1, cocoon 2.0.4)

i make a lot of changes (thanks lionel & hussayn) but
i got always the same message in tomcat stdout

----------------------------

Starting service Tomcat-Standalone
Apache Tomcat/4.1.12-LE-jdk14
java.lang.RuntimeException: Fatal: Errors in XSLT transformation:
Warning: File
jar:file:/C:/etango/tomcat/webapps/cocoonsamples/WEB-INF/lib/cocoo
n-2.0.4.jar!/org/apache/cocoon/components/language/markup/sitemap/java/sitem
ap.xsl;
Line 1817; Column 34;
[Logicsheet processor] Attribute 'type' missing in dynamic tag <map:match>

Fatal: Ach?vement dirigU de la feuille de style


        at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3170)
        at java.lang.Thread.run(Thread.java:536)
----------------------------

last sitemap.xmap

-----------------------------
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>
  <map:components>
   <map:components>
     <map:generators   default="file"/>
     <map:generator name="html"
src="org.apache.cocoon.generation.HTMLGenerator"/>

     <map:transformers default="xslt"/>
     <map:readers      default="resource"/>
     <map:serializers  default="html"/>
     <map:matchers default="wildcard"/>
   </map:components>


  </map:components>

  <map:pipelines>


    <map:pipeline>
      <map:match pattern="index.html">
        <map:generate type="html" src="index.html"/>
        <map:serialize/>
      </map:match>
    </map:pipeline>

  </map:pipelines>

</map:sitemap>
-----------------------------

-----Message d'origine-----
De : Lionel Crine [mailto:[EMAIL PROTECTED]]
Envoye : jeudi 13 fevrier 2003 10:21
A : [EMAIL PROTECTED]
Objet : RE: newbies : problem with sitemap.xmap


in my sitemap i write that :



        <map:generator name="html"
src="org.apache.cocoon.generation.HTMLGenerator"/>

...
        <map:match pattern="html">
          <map:generate type="html" src="test.html"/>
          <map:serialize/>
        </map:match>

It's working fine ..
The reader is used for the css, jpg, etc ....

Hope that help

At 10:09 13/02/2003 +0100, you wrote:

i had it in sitemap.xmap

but it doesnt work

in catalina stdout i obtaint this

----------------------------------------------------------

Starting service Tomcat-Standalone
Apache Tomcat/4.1.12-LE-jdk14
java.lang.RuntimeException: Fatal: Errors in XSLT transformation:
Warning: File
jar:file:/C:/etango/tomcat/webapps/cocoonsamples/WEB-INF/lib/cocoo
n-2.0.4.jar!/org/apache/cocoon/components/language/markup/sitemap
/java/sitem

ap.x
sl; Line 1817; Column 34;
               [Logicsheet processor] Attribute 'type' missing
in dynamic

tag <
map:match>

Fatal: Ach?vement dirigU de la feuille de style


       at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java
:3170)
       at java.lang.Thread.run(Thread.java:536)

-----------------------------------------------------------------

and exactely the same message in browser



-----Message d'origine-----
De : Lionel Crine [mailto:[EMAIL PROTECTED]]
Envoye : jeudi 13 fevrier 2003 10:01
A : [EMAIL PROTECTED]
Objet : Re: newbies : problem with sitemap.xmap


you need a reader :

<map:readers default="resource">
    <map:reader logger="sitemap.reader.resource" name="resource"
pool-max="32" src="org.apache.cocoon.reading.ResourceReader"/>
</map:readers>


in the components

see the sitemaAt 09:55 13/02/2003 +0100, you wrote:

hi

i got a problem with cocoon 2
i would like to serve static page

so i write sitemap.xmap like this


-------------------------------------------------
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>
 <map:components>
   <map:generators>
 <map:generator name="serverpages"
src="org.apache.cocoon.generation.ServerPagesGenerator"/>
</map:generators>


<map:serializers>
 <map:serializer name="xml" mime-type="text/xml"
src="org.apache.cocoon.serialization.XMLSerializer"/>
</map:serializers>

<map:matchers>
 <map:matcher name="wildcard"
src="org.apache.cocoon.matching.WildcardURIMatcher"/>
</map:matchers>



</map:components>

<map:pipelines>


<map:pipeline>
    <map:match pattern="index.html">
       <map:read src="index.html" mime-type="text/html"/>
    </map:match>
 </map:pipeline>


</map:pipelines>

</map:sitemap>
------------------------------------------------





but it doesnt work

in browser i always obtaint this message









Cocoon 2 - Internal server error

-----------------------------------------------------------------
-----------

----

type fatal

message Language Exception

description org.apache.cocoon.ProcessingException: Language

Exception:

org.apache.cocoon.components.language.LanguageException:

Error compiling

sitemap_xmap: Line 241, column 54: '}' expected Line 63,

column 11: class

org.apache.cocoon.www.sitemap_xmap should be declared abstract;
it does not

define method process(org.apache.cocoon.environment.Environment,
org.apache.cocoon.components.pipeline.StreamPipeline,
org.apache.cocoon.components.pipeline.EventPipeline) in class
org.apache.cocoon.sitemap.AbstractSitemap Line 0, column 0: 2 errors

sender org.apache.cocoon.servlet.CocoonServlet

source Cocoon servlet

stack-trace

org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException:

Error compiling

sitemap_xmap:
Line 241, column 54:  '}' expected
Line 63, column 11:  class

org.apache.cocoon.www.sitemap_xmap should be

declared abstract; it does not define method
process(org.apache.cocoon.environment.Environment,
org.apache.cocoon.components.pipeline.StreamPipeline,
org.apache.cocoon.components.pipeline.EventPipeline) in class
org.apache.cocoon.sitemap.AbstractSitemap
Line 0, column 0:
2 errors

       at
org.apache.cocoon.components.language.generator.ProgramGeneratorI
mpl.createR

esource(ProgramGeneratorImpl.java:360)
       at
org.apache.cocoon.components.language.generator.ProgramGeneratorI
mpl.load(Pr

ogramGeneratorImpl.java:312)
       at org.apache.cocoon.sitemap.Handler.run(Handler.java:267)
       at java.lang.Thread.run(Thread.java:536)
Caused by:

org.apache.cocoon.components.language.LanguageException: Error

compiling sitemap_xmap:
Line 241, column 54:  '}' expected
Line 63, column 11:  class

org.apache.cocoon.www.sitemap_xmap should be

declared abstract; it does not define method
process(org.apache.cocoon.environment.Environment,
org.apache.cocoon.components.pipeline.StreamPipeline,
org.apache.cocoon.components.pipeline.EventPipeline) in class
org.apache.cocoon.sitemap.AbstractSitemap
Line 0, column 0:
2 errors

       at
org.apache.cocoon.components.language.programming.java.JavaLangua
ge.compile(

JavaLanguage.java:243)
       at
org.apache.cocoon.components.language.programming.CompiledProgram
mingLanguag

e.load(CompiledProgrammingLanguage.java:207)
       at
org.apache.cocoon.components.language.generator.ProgramGeneratorI
mpl.generat

eResource(ProgramGeneratorImpl.java:417)
       at
org.apache.cocoon.components.language.generator.ProgramGeneratorI
mpl.createR

esource(ProgramGeneratorImpl.java:353)
       ... 3 more
org.apache.cocoon.components.language.LanguageException:

Error compiling

sitemap_xmap:
Line 241, column 54:  '}' expected
Line 63, column 11:  class

org.apache.cocoon.www.sitemap_xmap should be

declared abstract; it does not define method
process(org.apache.cocoon.environment.Environment,
org.apache.cocoon.components.pipeline.StreamPipeline,
org.apache.cocoon.components.pipeline.EventPipeline) in class
org.apache.cocoon.sitemap.AbstractSitemap
Line 0, column 0:
2 errors

       at
org.apache.cocoon.components.language.programming.java.JavaLangua
ge.compile(

JavaLanguage.java:243)
       at
org.apache.cocoon.components.language.programming.CompiledProgram
mingLanguag

e.load(CompiledProgrammingLanguage.java:207)
       at
org.apache.cocoon.components.language.generator.ProgramGeneratorI
mpl.generat

eResource(ProgramGeneratorImpl.java:417)
       at
org.apache.cocoon.components.language.generator.ProgramGeneratorI
mpl.createR

esource(ProgramGeneratorImpl.java:353)
       at
org.apache.cocoon.components.language.generator.ProgramGeneratorI
mpl.load(Pr

ogramGeneratorImpl.java:312)
       at org.apache.cocoon.sitemap.Handler.run(Handler.java:267)
       at java.lang.Thread.run(Thread.java:536)


request-uri

/cocoonsamples/index.html

path-info

index.html

------------------------------------------------



i dont understand


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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

--
Dr. Hussayn Dabbous
SAXESS Software Design GmbH
Neuenhöfer Allee 125
50935 Köln
Telefon: +49-221-56011-0
Fax:     +49-221-56011-20
E-Mail:  [EMAIL PROTECTED]


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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

Reply via email to