cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nadine Carlton" <nadine_carl...@hp.com>
Subject xsp and util:include-file
Date Wed, 13 Dec 2000 01:36:02 GMT
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.  

I don't seem to be able to use a variable to the util:include-file
taglib.  For example,

String filename = request.getParameter("filename");
if (filename != null) {
 String filepath = XSPUtil.relativeFilename(filename, request, (ServletContext) context);
}
<util:include-file name="<xsp:expr> filepath </xsp:path>" />

Gets an error: 
org.xml.sax.SAXParseException: The value of attribute "name" must not contain the '<' character.

Hard coding the file works: <util:include-file name="evueinput.xml" />
<util:include-file name="filepath" /> looks for a file called filepath.

After the file is added to document, I'm able to access elements with 
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 

to do it?

Nadine Carlton



Mime
View raw message