Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Dynamic Changing of XML Content

We are using xml/xsl to generate html pages for our website. Those xmls are
generated from database. The question is, when there is a small change in
database, we want to reflect this change in our xml without taking too much
time to unnecessarily re-generate the whole thing. This should be triggered
by the database change dynamically.

Any ideas on this will be greatly appreciated. Thanks in advance.
[428 byte] By [richard] at [2007-11-9 15:27:58]
# 1 Re: Dynamic Changing of XML Content
You can use database triggers to fire other events--for example, writing a
file or running an application. The question I have for you is: Can you
isolate or have you isolated the xml contents from the remainder of the
page? In other words, do you need the XML throughout the page, or is the XML
content limited to a specific area, such as the contents of a table or
control?

If you can isolate it, you should be able to create an XSL stylesheet that
creates the "dynamic" portion of the page, and create a static HTML file (or
a separate stylesheet) that contains the "static" portion of the page. That
static portion would have an SSI (server-side include) command to insert the
dynamic content at request time. Use the database trigger to write the XML
file and run the transform.

There are other methods you could use to accomplish the same thing if you're
using a server-side technology such as ASP, JSP, PHP, or ASP.NET.

"richard" <richard@s5systems.com> wrote in message
news:3e383245$1@tnews.web.dev-archive.com...
>
> We are using xml/xsl to generate html pages for our website. Those xmls
are
> generated from database. The question is, when there is a small change in
> database, we want to reflect this change in our xml without taking too
much
> time to unnecessarily re-generate the whole thing. This should be
triggered
> by the database change dynamically.
>
> Any ideas on this will be greatly appreciated. Thanks in advance.
>
>
Russell Jones at 2007-11-11 23:29:50 >