XML & XSLT gallery confused

R

ree32

I am a bit confused with capabilities of XML.

I have an XML document with information on images(photos). Is there way
to use XSL/XSLT to create a page that will display the images as
gallery.

I am a bit confused as whether I have to run XT processor each time I
update the XML file. Or is the does the web browser come with XT
processor which will automatically load the xml document and transform
it using an XSLT?

If I have to run the XT processor each time I update the XML file then
I feel I would just let ASP.net create the gallery on the fly.

Thanks
 
M

mcv

I am a bit confused with capabilities of XML.

I have an XML document with information on images(photos). Is there way
to use XSL/XSLT to create a page that will display the images as
gallery.

Sure. As long as the XML file contains all the necessary info, I don't
see what could be the problem here.
I am a bit confused as whether I have to run XT processor each time I
update the XML file. Or is the does the web browser come with XT
processor which will automatically load the xml document and transform
it using an XSLT?

If I have to run the XT processor each time I update the XML file then
I feel I would just let ASP.net create the gallery on the fly.

I have absolutely no idea what you're talking about here. I use cocoon,
which is unsurpassed at doing xml and xsl.


mcv.
 
A

Andy Dingley

I am a bit confused as whether I have to run XT processor each time I
update the XML file.


Take your pick - almost anything works.

If the gallery is fairly static, then run the XSLT processor when you
change it.

If the gallery is very dynamic (database query ?) then generate the XML
document on the fly and transform it on the server when serving the
page.

Then create some sort of caching architecture, appropriate to what
you're actually doing. Cache the XML document if that's fairly static,
cache the output HTML if you're desperate for performance.

Do some benchmarking too. You are likely to find that _loading_ the XSLT
is the slowest taask, yet one of the easiest to cache.


Don't send XML and XSLT to the browser. This works really well, but it's
not portable across a wide range of browsers.
 
R

ree32

Ok I got it working but I have a problem as I am wondering if XSL has
the ability to select a node when a link is clicked on the XML
document. i.e. So when a link is clicked it displays more information
on that particular node ( i.e. shows info from child nodes.)
 
N

Nick Kew

Andy said:
Do some benchmarking too. You are likely to find that _loading_ the XSLT
is the slowest taask, yet one of the easiest to cache.

FWIW, mod_transform (and its predecessors) on Apache have supported
that for over three years.

Of course, the bottleneck with any XSLT is the need to parse the entire
DOM into memory. If you're dealing with big documents then cacheing the
output helps.
 
A

Andy Dingley

Of course, the bottleneck with any XSLT is the need to parse the entire
DOM into memory. If you're dealing with big documents then cacheing the
output helps.

The main thing is to know what the hell you're doing ! I've seen some
_vile_ XSLT architectures, where "architects" had just lost sight of
where the real bottleneck was, and what was inherently non-cachable
because it was simply too dynamic. You _must_ keep track of what's
actually going on, and you _should_ base your choice of what and where
to optimise on some real measured analysis of bottlenecks.
 
P

Peter Flynn

I am a bit confused with capabilities of XML.

I have an XML document with information on images(photos). Is there way
to use XSL/XSLT to create a page that will display the images as
gallery.

I am a bit confused as whether I have to run XT processor each time I
update the XML file.

Yes you do, if you are doing the conversion manually at the server end.
Or is the does the web browser come with XT
processor which will automatically load the xml document and transform
it using an XSLT?

That's another way to do it: client-side. But not recommended, as not
everyone has a browser which can handle XSLT transformations.
If I have to run the XT processor each time I update the XML file then
I feel I would just let ASP.net create the gallery on the fly.

Have a look at Cocoon or AxKit or PropelX which seem to do exactly what you
want, server-side.

///Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top