[jdom-interest] Why Class.forName("javax.xml.transform.Transformer")?

Jason Hunter jhunter at acm.org
Sun Apr 7 19:09:55 PDT 2002


Elliotte Rusty Harold wrote:
> 
> In JAXPDOMAdapter can somebody explain to me why the following code is
> present in the getDocument() method:
> 
>             // Try using JAXP...
>             // Note we need DOM Level 2 and thus JAXP 1.1.
>             Class.forName("javax.xml.transform.Transformer");
> 
> Is this just a test for JAXP 1.1? Or is something else going on? We
> don't appear to actually use the Transformer class anywhere.

IIRC, it's a test that they're using JAXP 1.1 and not 1.0, probably
because we wanted to ensure JAXP namespace support.

-jh-



More information about the jdom-interest mailing list