________________________________________
From: Brolin Empey [mailto:[email protected]]
Sent: Friday, 15 May 2009 3:27 AM
To: [email protected]
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:
<table>
<!-- unique rows -->
<include href="duplicated_row.xml"/>
</table>
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
<table>
<!-- unique rows -->
<xi:include href="cocoon://path/to/duplicated_row.xml"/>
</table>
The duplicated_row.xml then only need contain your <tr> element.
HTH
Gav...
P.S. - It makes it easier for replies to be inline if you post as plain text
instead of html ;)