On Thu, 12 Dec 2002, Hunsberger, Peter wrote:
> > The above template match="title" works fine if I paste it into the main
> xsl file.  But if
> > instead, right there in it's place, in the main xsl, I put this:
> >
> > <xsl:include href="stylesheets/other.xsl"/>
> >
> > to include the above file, the match is no longer applied in the output.
> I'm perfectly open to > other ways of doing this.  I'm just getting started.
>
> So in-other-words there is no main matching template in the XSL doing the
> include?

Well no, I guess there isn't.  The docs on include seem to say that it's
like a #include<file> in a C source file.  In other words, the included
xsl is simply inserted in place before the processing is done.

The file I'm including contains one template, but it doesn't get applied.
The same template does get applied if I manually do what (I think)
xsl:include is supposed to do.  Namely, pasting that match block into the
main xsl in place of the xsl:include tag.

> It sounds like the default template in the primary is being picked
> up and it of course is not ever going to apply your included template.
>
> This isn't a Cocoon problem, you can test your code in any XSLT
> debugger/editor (Xslerator for example).  Spend some time at
> http://www.mulberrytech.com/xsl/ and check out the list archive there
> (search on default templates)...

I've been looking at various doc sites all morning.  Some examples I've
found are as simple as what I've done, I think.  Obviously I'm missing
something here.


---------------------------------------------------------------------
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