List Info

Thread: AxKit2 : AxAddRootProcessor




AxKit2 : AxAddRootProcessor
user name
2007-06-18 05:22:52
Hello.

So, after the advice I got on this list, I decided to give
it a go and
run AxKit2 to deliver XML-turned-HTML files on our site. The
very
basic setup works well so far: using Apache as a main server
and,
using mod_rewrite, letting .xml files (and only those) be
delivered by
the second AxKit server.

I do however have a question (and I bet I'll come up with
more at some
later point).

In the original setup, there were a lot of XSLT-stylesheets
and which
one(s) to use was decided from the root of the XML document,
by using
a lot of AxAddRootProcessor-entries in the configuration
file. Now I
want to do something similar in AxKit2. I could go and write
a plugin
that does that myself, and I bet it would be a very good
exercise, but
I'm worried I might just be re-inventing the wheel. Has
anyone ever
done something similar in AxKit2?

Thanks.

Martijn.

------------------------------------------------------------
---------
To unsubscribe, e-mail: axkit-users-unsubscribeaxkit.org
For additional commands, e-mail: axkit-users-helpaxkit.org


Re: AxKit2 : AxAddRootProcessor
user name
2007-06-18 05:43:10
Martijn,

> So, after the advice I got on this list, I decided to
give it a go and
> run AxKit2 to deliver XML-turned-HTML files on our
site. The very
> basic setup works well so far: using Apache as a main
server and,
> using mod_rewrite, letting .xml files (and only those)
be delivered by
> the second AxKit server.

Could you write an idiots guide for that please? It sounds
useful.

> In the original setup, there were a lot of
XSLT-stylesheets and which
> one(s) to use was decided from the root of the XML
document, by using
> a lot of AxAddRootProcessor-entries in the
configuration file.

I hated lot's of stylesheet choosing in the config. It
depends how
many stylesheets on has I suppose.
Anyhow, at any point in time my app knows what
"state" it is in. ie what
the screen is and therefore the stylesheet. (ajax aside for
this
argument). Most of my methods are called state_"name of
state"
and my stylesheets are named "name of state".xsl.
I have a method called get_stylesheets which returns an
array ref of
hashrefs. An array because there may be a chain of sheets
and a hashref
for the name of the sheet and another one for any params
the sheet requires eg:

my $stylesheets = {
		    [ style => 'name of sheet',
		      params => {}
		    ]
                  };

The above is very simple, my actual code is a tad more
tedious as it
has to cater for pop up windows etc.

So, in my hook_xmlresponse I have a generalised call to an
xml generation method and one that gets all the
stylesheets.

I will post the actual methods if you want.

John


------------------------------------------------------------
---------
To unsubscribe, e-mail: axkit-users-unsubscribeaxkit.org
For additional commands, e-mail: axkit-users-helpaxkit.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )