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 57920 invoked from network); 13 Dec 2000 01:37:01 -0000 Received: from palrel1.hp.com (156.153.255.242) by locus.apache.org with SMTP; 13 Dec 2000 01:37:01 -0000 Received: from hpcuhe.cup.hp.com (hpcuhe.cup.hp.com [15.0.80.203]) by palrel1.hp.com (Postfix) with ESMTP id F35F89B2 for ; Tue, 12 Dec 2000 17:37:00 -0800 (PST) Received: from nc703572 (nc703572.cup.hp.com [15.4.24.29]) by hpcuhe.cup.hp.com (8.9.3 (PHNE_18979)/8.9.3 SMKit7.02) with SMTP id RAA12995 for ; Tue, 12 Dec 2000 17:36:56 -0800 (PST) Message-ID: <02f601c064a5$1093b170$1d18040f@nc703572.cup.hp.com> From: "Nadine Carlton" To: Subject: xsp and util:include-file Date: Tue, 12 Dec 2000 17:36:02 -0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_02F3_01C06461.FF9E1790" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N ------=_NextPart_000_02F3_01C06461.FF9E1790 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I have used util:include-file to include an XML document into my xsp page. I have some of the basic functionality working that I want to use, but a couple of things don't work the way I thought they would. =20 I don't seem to be able to use a variable to the util:include-file taglib. For example, String filename =3D request.getParameter("filename"); if (filename !=3D null) { String filepath =3D XSPUtil.relativeFilename(filename, request, = (ServletContext) context); } filepath " /> Gets an error:=20 org.xml.sax.SAXParseException: The value of attribute "name" must not = contain the '<' character. Hard coding the file works: looks for a file called = filepath. After the file is added to document, I'm able to access elements with=20 document.getElementsByTagName("myelement"), but document.getElementsByTagNameNS(NAMESPACE_URI,"myelement") doesn't return any nodes. I've tried NAMESPACE_URI values of * and = xsp:, but neither works. Should I be trying to use the NS methods? I'm using Cocoon 1.7.3. Finally, the document I'm including has input information that I don't want to include in the output. I'm currently removing the document subtree using XSLT. Is there a better way=20 to do it? Nadine Carlton ------=_NextPart_000_02F3_01C06461.FF9E1790 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
  I have used util:include-file to include an = XML=20 document into my
xsp page.  I have some of the basic = functionality working=20 that I
want to use, but a couple of things don't work the = way I=20 thought
they would. 
 
I don't seem to be able to use a variable to the=20 util:include-file
taglib.  For example,
 
String filename =3D=20 request.getParameter("filename");
if (filename !=3D null) = {
 String filepath =3D=20 XSPUtil.relativeFilename(filename, request, (ServletContext)=20 context);
}
<util:include-file=20 name=3D"<xsp:expr> filepath </xsp:path>" />
 
Gets an=20 error:
org.xml.sax.SAXParseException: The value of = attribute "name"=20 must not contain the '<' character.
 
Hard coding the file works:=20 <util:include-file name=3D"evueinput.xml" />
<util:include-file name=3D"filepath" /> looks = for a file=20 called filepath.
 
After the file is added to document, I'm able to = access=20 elements with
document.getElementsByTagName("myelement"),
but=20 document.getElementsByTagNameNS(NAMESPACE_URI,"myelement")
doesn't return any nodes.  = I've tried=20 NAMESPACE_URI values of * and xsp:,
but neither works. Should I be = trying to=20 use the NS methods? I'm
using Cocoon 1.7.3.

Finally, the document I'm including has input information

that I don't want to include in the output.  I'm currently

removing the document subtree using XSLT.  Is there a better way =

to do it?

Nadine Carlton

------=_NextPart_000_02F3_01C06461.FF9E1790--