[jdom-interest] JDOM and XSL

Brett McLaughlin brett at newInstance.com
Wed Feb 7 14:00:27 PST 2001


> -----Original Message-----
> From: jdom-interest-admin at jdom.org
> [mailto:jdom-interest-admin at jdom.org]On Behalf Of Jan Peter Hecking
> Sent: Wednesday, February 07, 2001 2:55 PM
> To: jdom-interest at jdom.org
> Subject: Re: [jdom-interest] JDOM and XSL
>
>
> On Wed, Feb 07, 2001 at 12:54:03AM -0800, Charlie Wu wrote:
> > I tried to play with your code with some minor alterations ..
> and I believe
> > I am using the latest xalan-j(2.0) and xerces.jar.. however
> when I tried to
> > run my program I'm getting this error (in debugger, if I run it
> directly it
> > hangs).. any ideas?
> >
> > javax.xml.transform.TransformerException: Namespace not supported by
> > SAXParser
>
> Sorry I have no idea why you get this exception.
> But may I ask why you use JDOM at all? If you are starting with a
> XML file and want to get another XML file there's no reason to
> convert either source or result to JDOM first.

I actually agree - now I can see you turning the resultant, styled, XML into
JDOM, like so:

XML -> XSLT -> XML -> JDOM

to work with. Or, if the XML at the beginning is dynamic, you might have:

JDOM -> XSLT -> XML -> JDOM

But if you are really taking an XML document as is, convert straight into
XSL processors and save some time :)

(See, even JDOM nuts can be rational at times :) )

-Brett

>
> What you do right now looks something like this:
>
>             Stylesheet
>                 V
> XML -> JDOM -> XSLT -> JDOM -> XML
>
> But realy you want this:
>
>             Stylesheet
>                 V
>         XML -> XSLT -> XML
>
> Take a look at the attached XML2HTML.java. It's a lot simpler - and
> it works! ;-)
>
> bye,
> Jan
>
> --
> Jan Peter Hecking                  jhecking at netgaroo.com
> University of Rostock     Department of Computer Science
> Homepage: http://www.informatik.uni-rostock.de/~jhecking
>




More information about the jdom-interest mailing list