I've begun work on the jaxen section of Processing XML with Java, 
http://www.cafeconleche.org/books/xmljava/

Along the way I'll probably note a few things. First off the bat, 
consider these three methods in org.jaxen.BaseXPath:

public String <http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html> 
*valueOf*(Object <http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html> 
context) throws JaxenException <cid:[EMAIL PROTECTED]>


public boolean *booleanValueOf*(Object 
<http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html> context) throws 
JaxenException <cid:[EMAIL PROTECTED]>


public Number <http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Number.html> 
*numberValueOf*(Object 
<http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html> context) throws 
JaxenException

 <cid:[EMAIL PROTECTED]>

Their names are inconsistent. I suggest the first be renamed 
stringValueOf(). This is also more consistent with the XPath spec which 
generally refers to the "string-value" of a node, rather than just the 
value of a node. The latter is perhaps the more common expression in 
XSLT circles, but here string-value is clearly correct..

-- 
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | [EMAIL PROTECTED] | Writer/Programmer |
+-----------------------+------------------------+-------------------+ 
|           The XML Bible, 2nd Edition (IDG Books, 2001)             |
|             http://www.cafeconleche.org/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:   http://www.cafeaulait.org/     | 
|  Read Cafe con Leche for XML News:  http://www.cafeconleche.org/   |
+----------------------------------+---------------------------------+

Reply via email to