Return-Path: Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 86702 invoked from network); 28 Sep 2000 12:34:12 -0000 Received: from qnsgs000.nortelnetworks.com (HELO qnsgs000.nortel.com) (47.211.0.31) by locus.apache.org with SMTP; 28 Sep 2000 12:34:12 -0000 Received: from zhard00m.europe.nortel.com (actually zhard00m) by qnsgs000.nortel.com; Thu, 28 Sep 2000 13:23:25 +0100 Received: by zhard00m.europe.nortel.com with Internet Mail Service (5.5.2652.35) id ; Thu, 28 Sep 2000 13:23:22 +0100 Message-ID: <0979C0AA41FED111BCFB00204804FC130356120E@zhard000.europe.nortel.com> From: "Chris Newland" To: "'cocoon-users@xml.apache.org'" Subject: RE: xinclude into a DOM document? Date: Thu, 28 Sep 2000 13:23:20 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2652.35) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C02946.E3186450" X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C02946.E3186450 Content-Type: text/plain; charset="ISO-8859-1" 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 know. NB The xml to be included would only work for me if it was enclosed by tags: include_me.xml : Best Regards to all Cocooners, Chris -----Original Message----- From: Newland, Chris [mailto:cnewland@europem01.nt.com] Sent: 28 September 2000 11:27 To: Cocoon User Mailing List (E-mail) Subject: xinclude into a DOM document? Hi, 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. Thanks, Best Regards, Chris -- 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 Email: cnewland@nortelnetworks.com "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. ------------------------------------------------------------ ------_=_NextPart_001_01C02946.E3186450 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable RE: xinclude into a DOM document?

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

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

<xsp:page language=3D"java" = xmlns:xsp=3D"http://www.apache.org/1999/XSP/Core">

        <page = xmlns:xinclude=3D"http://www.w3.org/1999/XML/xinclude">

        =         <outerstructure>

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

        =         =         <include = xinclude:parse=3D"xml" = xinclude:href=3D"include_me.xml"/>

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

        =         </outerstructure>

        </page>

</xsp:page>

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

include_me.xml :

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

        <!-- = xml fragment -->

</root>

Best Regards to all Cocooners,

Chris

-----Original Message-----
From: Newland, Chris [mailto:cnewland@europem01.nt.c= om]
Sent: 28 September 2000 11:27
To: Cocoon User Mailing List (E-mail)
Subject: xinclude into a DOM document?


Hi,
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.

Thanks,
Best Regards,
Chris
--
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
Email: cnewland@nortelnetworks.com
"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. =
------------------------------------------------------------ =

------_=_NextPart_001_01C02946.E3186450--