[jdom-interest] Using TraX

Jason Hunter jhunter at acm.org
Wed Apr 17 04:02:24 PDT 2002


The Javadocs are best.  The source is there if the Javadocs aren't
explicit enough.  Specific questions get answered on this list.

-jh-

Jasmeet.Singh at eontec.com wrote:
> 
> Thanks Jason
> But how do i do that ..
> is there a place where i can have guidelines for this
> 
> thanks
> jasmeet
> 
> 
>                     Jason Hunter
>                     <jhunter at acm.        To:     Jasmeet.Singh at eontec.com
>                     org>                 cc:     jdom-interest at jdom.org
>                                          Subject:     Re: [jdom-interest] Using TraX
>                     04/17/02
>                     10:45 AM
> 
> 
> 
> After the transform it's no longer a MyDocument.  You could set the
> factory on JDOMResult if you wanted that.
> 
> -jh-
> 
> Jasmeet.Singh at eontec.com wrote:
> >
> > HI  All
> >
> > I am trying to use JDOM TraX for transforming the source JDOM document
> into
> > another
> >
> > i use the following as in javadoc for the classes
> >
> >     try {
> >
> >         Transformer transformer = TransformerFactory.newInstance
> > ().newTransformer(new StreamSource(stylesheet));
> >         JDOMResult out = new JDOMResult();
> >         transformer.transform(new JDOMSource(in), out);
> >         return (MyDocument) out.getDocument();
> >
> >     } catch (Exception e) {
> >         throw new MyException("XSLT Trandformation failed :: " +
> > e.getMessage());
> >     }
> >
> > I get a class cast exception while casting out.getDocument() to
> > MyDocument..
> > MyDocument is a subclass of org.jdom.Document.. I have using JDOMFactory
> as
> > a subclass of DefaultJDOMFactory to get my own version of Docments and
> > Elements
> >
> > Am i missing anything in this transformation ni particular
> >
> > thanks
> > jasmeet
> >
> > _______________________________________________
> > To control your jdom-interest membership:
> >
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com



More information about the jdom-interest mailing list