tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray Allis <ray.al...@boeing.com>
Subject Re: xtags taglib - templates and copyOf
Date Wed, 20 Jun 2001 23:43:07 GMT
James Strachan wrote:

> Hi Ray
> 
> <xtags:copyOf> 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 <xtags:copyOf> 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?

Thank you!  I was using xtags-20010511.tar.gz because that was the 
latest I could find on jakarta.apache.org last week.

So, I downloaded xtags-20010620.tar.gz from jakarta.apache.org, put
xtags-examples.war in jakarta-tomcat-4.0-b5/webapps/ and started tomcat.

http://analogy.sea.boeing.com:8080/xtags-examples/index.jsp works, 
except the style demos...

ClassNotFoundException: org.apache.xalan.processor.TransformerFactoryImpl

So, now -my- application has:

jakarta-tomcat-4.0-b5/webapps/xmlnews/WEB-INF/lib
-rw-r--r--   1 ray      staff     187162 Jun 20 15:36 crimson.jar
-rw-r--r--   1 ray      staff     409380 Jun 20 14:53 dom4j.jar
-rw-r--r--   1 ray      staff      10998 Jun 19 20:21 input.jar
-rw-r--r--   1 ray      staff      20643 Jun 15 10:02 io.jar
-rw-r--r--   1 ray      staff      92132 Jun 20 14:53 log4j-core.jar
-rw-r--r--   1 ray      staff     436249 Jun 20 14:54 xalan.jar
-rw-r--r--   1 ray      staff      76332 Jun 20 14:54 xtags.jar

and my application seems to work!


<%@taglib uri="http://jakarta.apache.org/taglibs/io-1.0" prefix="io" %>
<%@ taglib uri="http://jakarta.apache.org/taglibs/xtags-1.0" 
prefix="xtags" %>
<%@ taglib uri="http://jakarta.apache.org/taglibs/input-0.90" 
prefix="input" %>
<html>
   <head>
     <meta http-equiv="Content-Type" content="text/html; 
charset=ISO-8859-1">
     <title>Eventually, display news item</title>
     <link rel="stylesheet" href="examples.css" type="text/css">
   </head>
   <body>

     <h2>Documents</h2>

   <xtags:parse>
     <io:http url="http://analogy.sea.boeing.com:1234" action="POST">
     <io:header name="Content-Type" value="text/xml"/>
     <io:pipe>
       <xyz:input xmlns:xyz="http://xyzfind.com/schemas/xyzql/1.0">
         <xyz:query>
           <xyz:document name="IndonesiaSummit.xml"/>
         </xyz:query>
       </xyz:input>
     </io:pipe>
     </io:http>
   </xtags:parse>

     <form method="post" >
       <table cellspacing="0" cellpadding="2" bgcolor="#000000" border="1">
         <tr bgcolor="#dddddd">
           <th>Headline</th>
           <th>Dateline</th>
           <th>Body</th>
         </tr>

       <xtags:forEach select="//results/document/NewsItem/NewsComponent">
         <tr bgcolor="#eeeeee">
           <td>
             <xtags:valueOf select="NewsLines/HeadLine"/>
           </td>
           <td>
             <xtags:valueOf select="NewsLines/DateLine"/>
           </td>
           <td>
             <xtags:copyOf 
select="ContentItem/DataContent/body/body.content" />
           </td>
         </tr>
         <tr>
           <td colspan="3">
             <input:textarea name="words" default="DEFAULT" />
           </td>
         </tr>
       </xtags:forEach>
       </table>
     </form>
   </body>
</html>

I have had these things all over the place.  Last successful setup had
dom4j and log4j in /usr/java/jre/lib/ext (so I don't have to have them
in -every- application.)  This messed me up this time because those
were picked up rather than the newer ones in xtags-examples.

Thank you again.

Ray Allis


Mime
View raw message