cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Klaus-Hendrik Wolf <K-H.W...@ifmi.org>
Subject [c2] using xinclude
Date Mon, 23 Apr 2001 20:12:15 GMT
Hi,

trying Xinclude, i can't figure out how to run it correctly.

What I want to do is quite simple: Include an XML file at
a specified position.
For example taking the hello-page.xml:

<page>
  <title>Hello</title>
  <content xmlns:xinclude="http://www.w3.org/1999/XML/xinclude">
         <xinclude:include href="info.xml"/>
  </content>
</page>

Where in info.xml is the <para> taged line.
What I did was including the line

    <map:transformer     name="include" 
src="org.apache.cocoon.transformation.XIncludeTransformer"/>

into my sitemap and added the folloging pattern
    <map:match pattern="hello.xml">
     <map:generate src="docs/samples/hello-page.xml"/>
         <map:transform type="include"/>
     <map:serialize type="xml"/>
    </map:match>

The result is:

ERROR   5428    [cocoon  ] (main): FileGenerator.generate()
java.io.FileNotFoundException: 
C:\temp\xml-cocoon\dist\cocoon-2.0a5\webapp\docs\
samples\hello-page.xmlinfo.xml (Das System kann die angegebene Datei nicht 
finden)
         at 
org.apache.cocoon.transformation.XIncludeTransformer.startElement(XIncludeTransformer.java:134)

So it _seems_ to work, but the filename is just added to the orignals.
I tried something like /../ but that didn't work and maybe I am already to 
tired to find the right solution :-)

Can anyone help me?

Thanks

   Klaus Hendrik

-- 
Klaus-Hendrik Wolf

Institute for Medical Informatics
Braunschweig University of Technology
Fallersleber-Tor-Wall 22        Tel: +49-531-391-21 27
38100 Braunschweig      Fax: +49-531-391-21 31
Germany                           http://khw.ifmi.org


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

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message