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 xtags taglib - templates and copyOf
Date Tue, 19 Jun 2001 21:38:50 GMT
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 <p>, <b> 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.

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" %>
<html>
   <head>
     <meta http-equiv="Content-Type" content="text/html; 
charset=ISO-8859-1">
     <title>RSS Styling Demo</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>

     <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:valueOf 
select="ContentItem/DataContent/body/body.content/p" />
           </td>
         </tr>
       </xtags:forEach>
     </table>
   </body>
</html>

Ray Allis - ray.allis@boeing.com


Mime
View raw message