forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gavin" <>
Subject RE: Simple include files?
Date Thu, 14 May 2009 22:35:56 GMT

From: Brolin Empey [] 
Sent: Friday, 15 May 2009 3:27 AM
Subject: Simple include files?

Here is my situation:   I have 2 CPU module product pages.  Both pages
include a features table.  One row of this table is duplicated on both
pages.  I want to move the duplicated row into an include file.  Is it
possible to use an include file that does not have to be a complete
document?  I think this requires not validating the include file.

For example, here is one CPU module product page:

    <!-- unique rows -->
    <include href="duplicated_row.xml"/>

I want duplicated_row.xml to contain only the table row (tr element), not a
containing table, body, and document.

Is this possible?


Hi Brolin,

The 'forrest seed-sample' target shows a great example of using xinclude for
cases like this.

So you could have

    <!-- unique rows -->
    <xi:include href="cocoon://path/to/duplicated_row.xml"/>

The duplicated_row.xml then only need contain your <tr> element.



P.S. - It makes it easier for replies to be inline if you post as plain text
instead of html ;)

View raw message