cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Newland" <>
Subject RE: xinclude into a DOM document?
Date Thu, 28 Sep 2000 12:23:20 GMT
Don't worry, I've figured it out for myself:

For those interested, this example can be used to produce an xml structure
(outerstructure) that consists of dynamically generated xml (i.e. using XSP
logic to manipulate request parameters) plus static xml from a file which
can then be rendered by a stylesheet.

If somebody knows a better way to do this then could they please let me

<?cocoon-process type="xinclude"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="xml-to-html.xsl" type="text/xsl"?>

<xsp:page language="java" xmlns:xsp="">

	<page xmlns:xinclude="">


			<!-- use xsp logic to dynamically produce xml to go
before the included section -->

   			<include xinclude:parse="xml"

			<!-- use xsp logic to dynamically produce xml to go
after the included section -->




NB The xml to be included would only work for me if it was enclosed by
<root> </root> tags:

include_me.xml :

<?xml version="1.0" encoding="utf-8"?>

	<!-- xml fragment -->


Best Regards to all Cocooners,


-----Original Message-----
From: Newland, Chris []
Sent: 28 September 2000 11:27
To: Cocoon User Mailing List (E-mail)
Subject: xinclude into a DOM document?

It is possible within an XSP page to xinclude an xml file into a DOM
Document object and then use XSP code to add nodes to the included Document?
I would like to be able to keep a repository of Document fragments in files
and load them and finish them off dynamically.
Best Regards, 
Chris Newland 
Software Research Engineer 
Advanced IP Services and Management 
Nortel Networks, London Road, Harlow, Essex, CM17 9NA. 
Tel:   +44(0)1279 405165 
Fax:   +44(0)1279 402047 
"This message may contain information proprietary to Nortel Networks 
so any unauthorised disclosure, copying or distribution of its 
contents is strictly prohibited." 
Company name: Nortel Networks plc 
Company number: 2515751 
Company's registered office address: Maidenhead Office Park, 
Westacott Way, Maidenhead, Berkshire SL6 3QH. 

View raw message