Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-taglibs Wiki" 
for change notification.

The following page has been changed by HenriYandell:
http://wiki.apache.org/jakarta-taglibs/Standard1%2e1%2e3FAQ

------------------------------------------------------------------------------
  Q. Using string() on a complex expression in an xml tag is returning an empty 
string. What's up?
  
- A. This was reported by Yuriy Yatsyk in 
[https://issues.apache.org/bugzilla/show_bug.cgi?id=33032 #33032] and appears 
to be due to some oddity in the way the Standard Taglib uses Xalan. The work 
around is to split your code up so that string() is applied to a simple 
expression. Using Yuriy's example:
+ A. This was reported by Yuriy Yatsyk in 
[https://issues.apache.org/bugzilla/show_bug.cgi?id=33032 #33032] and appears 
to be due to some oddity in the way the Standard Taglib uses Xalan. The work 
around is to split your code up so that string() is applied to a simple 
expression. 
  
- Change:
+ Using Yuriy's example change:
  
  {{{
  <x:set var="navigationPath" 
@@ -21, +21 @@

  <x:set var="navigationPath" select="string($navigationPath)" scope="request"/>
  }}}
  
+ 
+ Q. The Standard Taglib depends on Xalan. Why?
+ 
+ A. The original source was coded against Xalan packages and not the XSL 
specification. It's unlikely that this will be changing any time soon, so you 
will need to include Xalan with your web applications. See 
[https://issues.apache.org/bugzilla/show_bug.cgi?id=30050 #30050] to see if any 
developments occur with this issue.
+ 
+ 
+ Q. The order of columns coming back in my SQL query does not match the order 
returned by the specification. Why?
+ 
+ A. The underlying code for sql:query uses a TreeMap to hold the row data. 
Unfortunately the specification limits us and we can't change this to a 
SortedMap, so there is no way to fix this bug. However if you approach the 
sql:query differently you can work around this issue. Consider the following 
code that avoids using the row data:
+ 
+ {{{
+   <%-- Get the column names for the header of the table --%>
+   <c:forEach var="columnName" items="${db.columnNames}">
+     <th><c:out value="${columnName}"/></th>
+   </c:forEach>
+ 
+   <%-- Get the value of each column while iterating over rows --%>
+   <c:forEach var="row" items="${db.rowsByIndex}">
+     <tr>
+       <c:forEach var="column" items="${row}">
+         <td><c:out value="${column}"/></td>
+       </c:forEach>
+   </c:forEach>
+ }}}
+ 
+ For more information concerning this bug, see 
[https://issues.apache.org/bugzilla/show_bug.cgi?id=33054 #33054]
+ 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to