Return-Path: Delivered-To: apmail-jakarta-taglibs-user-archive@jakarta.apache.org Received: (qmail 33801 invoked by uid 500); 20 Jun 2001 14:14:40 -0000 Mailing-List: contact taglibs-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: taglibs-user@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list taglibs-user@jakarta.apache.org Delivered-To: moderator for taglibs-user@jakarta.apache.org Received: (qmail 78608 invoked from network); 20 Jun 2001 12:00:53 -0000 X-Apparently-From: Message-ID: <010501c0f980$a23c3a00$f475063e@spiritsoft.com> From: "James Strachan" To: References: <3B2FC66A.3050409@boeing.com> Subject: Re: xtags taglib - templates and copyOf Date: Wed, 20 Jun 2001 13:00:34 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Hi Ray From: "Ray Allis" > I am building a NewsML database application using JSP and XYZFind. > I'm stuck at handling the HTML (NITF) embedded in > /NewsML/NewsItem/NewsComponent/ContentItem/DataContent/body/body.content/ > > valueOf gives the text without the

, etc. markup. (Of course) > Supposedly copyOf will copy elements and contents, but I can't get > beyond errors like "Not allowed to flush in custom tags" or similar. > template should do copyOf? Nothing appears in the output. You're right. returns the string-value of an XPath expression (defined in the XPath spec) so it will strip all markup and just return text. is the tag you want, this essentially outputs the XML of the nodes you select via XPath, with all markup intact. I've hit the problem of and "Not allowed to flush in custom tags" before. There was some code calling flush() in the XTags code (and sometimes in the dom4j code) which I've patched recently. So maybe if you use the latest CVS image of the XTags library this problem might go away? If this doesn't fix your problem it might be something to do with your Servlet container. Which Servlet container are you using? It might be that you are hitting a JSP 1.1 issue. Its quite hard to build really useful JSP custom tags on JSP 1.1 due to the body tag issue - the only way to do loops in JSP 1.1 is to use body tags and inside body tags in JSP 1.1 you can't properly do calls or flush the output. e.g. has to be a body tag in JSP 1.1 so anything inside your loop is in a body tag which may cause problems with tags like ). It might be worth trying out your web app on Tomcat 4.0 which has full support for JSP 1.2 or WebLogic 6.1 (which I think has JSP 1.2 support also) James > > I have read http://www.dpawson.co.uk/xsl/sect2/N4554.html, and I thought > I understood it. The best I can do is select .../body.content/p and get > the (text of) the first paragraph. > > Will someone please help me understand how this works? > > ------ newsitem.jsp ------ > > <%@taglib uri="http://jakarta.apache.org/taglibs/io-1.0" prefix="io" %> > <%@ taglib uri="http://jakarta.apache.org/taglibs/xtags-1.0" > prefix="xtags" %> > > > > RSS Styling Demo > > > > >

Documents

> > > > > > > > > > > > > > > > > > > > > > > > > > > > >
HeadlineDatelineBody
> > > > > select="ContentItem/DataContent/body/body.content/p" /> >
> > > > Ray Allis - ray.allis@boeing.com > > _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com