You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Mike Gratton <mi...@vee.net> on 2002/02/20 17:40:26 UTC

example URIResolver implementation

Guys,

For anyone who is interested, rather than continuing to blather on about 
URIResolvers and the like, I just wrote a quick example of a URIResolver 
which should work for any XMLDB database, including Xindice.

Get it from: <http://web.vee.net/projects/uriresolver/>

The tarball contains a demo which uses the document() function in an 
XSLT stylesheet to retreive an XML document directly from a XMLDB db, 
effectively implementing a rather odd hashtable in the process.

The resolver is very basic and rough, but should give people a good idea 
where to start when writing their own. Feel free to email me with any 
feedback.

Cheers,
Mike.

-- 
Mike Gratton <mi...@vee.net>
"Every motive escalate."
  Blatant self-promotion: <http://web.vee.net/>


Re: example URIResolver implementation

Posted by Michael Gratton <mi...@vee.net>.

Mark J. Stang wrote:
 > I thought of XSLT, but I need to view them on the screen and print
 > them.

That's how I'd do it.

 > Oh, and my application is a Java Application, not browser based. I
 > could generate HTML and display it in an HTML Editor window, but how
 > would I print it?

The Swing JEditorPane/JTextPane supports rendering HTML, so the easiest 
way would be to get the transform generating HTML and streaming it into 
a JTextPane. You *should* be able to print it from there, but that's not 
something I've had experience with.

A better alternative would be to use FOP 
<http://xml.apache.org/fop/index.html>. Use XSLT to generate XSL:FO from 
your XML, then get FOP to render that. FOP supports rendering to a bunch 
of formats, including to PDF, PS, and Java Graphics objects (IIRC).

Mike.

-- 
Mike Gratton <mi...@vee.net>
   Leader in leachate production and transmission since 1976.
   <http://web.vee.net/>


Re: example URIResolver implementation

Posted by "Mark J. Stang" <ma...@earthlink.net>.
My question may be a bit off topic...

I am using Xindice as a database.   I am going to need to do
reports.   Reports in a relational world are customized around
the relationships between tables.   Using XML without fixed
relationships between the data in the documents makes creating
reports, shall we say, difficult.   Not having fixed relationships
is my whole reason for XML in the first place, so it is a feature,
not a bug :-).   However, I still need to create reports.   I thought
of XSLT, but I need to view them on the screen and print them.
Oh, and my application is a Java Application, not browser based.
I could generate HTML and display it in an HTML Editor window,
but how would I print it?

Bottom line and my question for the group is how will we print
reports using data stored in dbXML?

thanks,

Mark

Alexander Schatten wrote:

> very good, thank you. I will download it and try to get an idea
>
> Alex
>
> Mike Gratton wrote:
>
> >
> > Guys,
> >
> > For anyone who is interested, rather than continuing to blather on about
> > URIResolvers and the like, I just wrote a quick example of a URIResolver
> > which should work for any XMLDB database, including Xindice.
> >
> > Get it from: <http://web.vee.net/projects/uriresolver/>
> >
> > The tarball contains a demo which uses the document() function in an
> > XSLT stylesheet to retreive an XML document directly from a XMLDB db,
> > effectively implementing a rather odd hashtable in the process.
> >
> > The resolver is very basic and rough, but should give people a good idea
> > where to start when writing their own. Feel free to email me with any
> > feedback.
> >
> > Cheers,
> > Mike.
> >


Re: example URIResolver implementation

Posted by Alexander Schatten <al...@gmx.net>.
very good, thank you. I will download it and try to get an idea


Alex

Mike Gratton wrote:

> 
> Guys,
> 
> For anyone who is interested, rather than continuing to blather on about 
> URIResolvers and the like, I just wrote a quick example of a URIResolver 
> which should work for any XMLDB database, including Xindice.
> 
> Get it from: <http://web.vee.net/projects/uriresolver/>
> 
> The tarball contains a demo which uses the document() function in an 
> XSLT stylesheet to retreive an XML document directly from a XMLDB db, 
> effectively implementing a rather odd hashtable in the process.
> 
> The resolver is very basic and rough, but should give people a good idea 
> where to start when writing their own. Feel free to email me with any 
> feedback.
> 
> Cheers,
> Mike.
>