[jdom-interest] XSLT API is too complex

Elliotte Rusty Harold elharo at metalab.unc.edu
Mon Apr 29 08:00:10 PDT 2002


At 4:00 PM +0200 4/29/02, Laurent Bihanic wrote:

>>  I wrote simple implementations of XSLTransform and XSLException in the
>>  San Jose and Las Vegas airports on my way home from the conference.
>>  Since they're relatively long I've put them up on my web site at
>>  http://cafeconleche.org/jdom/XSLTransform.java
>
>2 remarks:
>  a. Why not have all constructors just calling a single one:
>        protected? public? XSLTransform(Source source)
>to make them as simple as:
>        public XSLTransform(Reader stylesheet) throws XSLException {
>           this(new StreamSource(stylesheet));
>        }
>

Good idea. I rewrote it like that. Thanks!


>  b. in transform, 2 JDOMSources are allocated. Remove line:
>           Source source = new JDOMSource(in);
>

Fixed.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          The XML Bible, 2nd Edition (Hungry Minds, 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/    |
+----------------------------------+---------------------------------+



More information about the jdom-interest mailing list