There's a little bug in a processor (see the maillist archive for more info
on this): to use xinclude, you must use the following tag:
<include xinclude:parse="xml" xinclude:href="a.xml" />
(it works for me and C1.8.2)

> -----Message d'origine-----
> De : Carloz Alaniz [mailto:[EMAIL PROTECTED]]
> Envoyé : lundi 9 juillet 2001 22:23
> À : [EMAIL PROTECTED]
> Objet : Re: Executing XML inside XML
> 
> 
> Olivier,
> I tried your suggestion but it does not work. 
> This is a more detailed explanation
> This is what my "c.xml" file looks like
> 
> <?xml version='1.0'?>
> <?cocoon-process type="xinclude"?>
> <page xmlns:xinclude="http://www.w3.org/1999/XML/xinclude";>
>   <xinclude:include href="a.xml"/>
> </page>
> 
> ~~~~
> This is what my "a.xml" file looks like
> 
> <?xml-stylesheet href="a.xsl" type="text/xsl"?>
> <?cocoon-process type="xslt"?>
> <?cocoon-process type="xinclude"?>
> 
> <header>
>   <title>this is my title</title>
>   <revision>revision.revision</revision>
>   <date>today</date>
>   <group>My Group</group>
>   <team>My Team</team>
> </header>
> 
> ~~~~
> This is what my "a.xsl" file looks like
> 
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>  
> <xsl:template match="header">
>  <html><head><title><xsl:value-of select="title"/>
> (header)</title></head>
>  <body bgcolor="white" onResize="location.reload()">
> 
>  <table align="left" width="250" bgcolor="white">
>  <tr><td aln="left" colspan="40">
>    <xsl:value-of select="title"/></td></tr>
>  <tr><td align="left">
>    Rev <xsl:value-of select="revision"/>
>  </td>
>  <td align="left">
>    <xsl:value-of select="date"/>
>  </td></tr>
>  </table>
>  <table align="right" width="450" bgcolor="white">
>  <tr><td align="right" colspan="0">
>    <xsl:value-of select="group"/>
>  </td></tr>
>  <tr><td align="right">
>    Rev <xsl:value-of select="team"/>
>  </td></tr>
>  </table>
> 
>  </body></html>
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> ~~~~~~
> I just get a blank gray screen as a result of this.
> How come "a.xml" is not executed when "c.xml" is called ??? 
> What am I doing wrong. 
> Please help me!
> 
> ~carloz
> 
> JEULIN Olivier wrote:
> > 
> > to use xinclude you'll need:
> > <?cocoon-process type="xinclude"?> to call the processor,
> > xmlns:xinclude="http://www.w3.org/1999/XML/xinclude"; in 
> <xsp:page> tag,
> > <include xinclude:parse="xml" 
> xinclude:href="your_filename.xml" /> where you
> > want to include a file
> > 
> > The only drawback is that if you use xsp, the content of 
> your included files
> > will be "static", that is if you change them, you won't see 
> the modification
> > until you rebuild the c.java file (by changing its date, 
> for example).
> > Otherwise, use <util:include-file name="results.xml" /> (and add
> > xmlns:util="http://www.apache.org/1999/XSP/Util"; to the 
> xsp:page tag)
> > Olivier
> > 
> > > -----Message d'origine-----
> > > De : Carloz Alaniz [mailto:[EMAIL PROTECTED]]
> > > Envoyé : lundi 9 juillet 2001 18:46
> > > À : [EMAIL PROTECTED]
> > > Objet : Executing XML inside XML
> > >
> > >
> > > Hi I am still trying to figure this out. I need help.
> > >
> > > This is what I want to do. I have a file lets name it a.xml
> > > which calls
> > > a.xsl which  produces an HTML heading in your browser.
> > >
> > > I have another file named b.xml which calls b.xsl and 
> produces an HTML
> > > footer.
> > >
> > > I am trying to create another another file named c.xml which
> > > calls both
> > > a.xml and b.xml and displays them together into a single HTML page
> > > displaying the header at the top and the footer at the 
> bottom. Someone
> > > suggested Xinclude but I can't get it to work.
> > >
> > > I am looking forward for you all cocooner's help.
> > >
> > > Best Regards,
> > > Carloz

---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to