我可以使用xslt样式表来更新网页吗? [英] Can I use an xslt stylesheet to update a web page?

查看:94
本文介绍了我可以使用xslt样式表来更新网页吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个数据密集型网络应用。应用程序的核心

将执行数据库查询并构建页面。我计划将数据作为xml

并将该数据和xslt样式表提供给浏览器。这是我的

问题:用户可以请求更多数据。我想以某种方式

使用相同(或其版本)样式表来转换这个新的

数据。但这会添加到现有页面中,而不是替换它。

有一个简单的方法吗?


TIA。


-

Matt Silberstein


今天就达尔富尔种族灭绝事件做点什么

http://www.beawitness.org
http://www.darfurgenocide.org
http:// www。 savedarfur.org


达尔富尔:种族灭绝我们可以停止

解决方案



Matt Silberstein写道:

但这被添加到现有页面,而不是替换它。




添加到现有页面的内容是什么?是什么意思?


这是网络。 HTTP工作,以便你得到一个新的页面(可能是更大的
),虽然它_looks_喜欢旧的页面添加了

它,它'实际上是一个全新的页面由全新的位和

字节组成。所以从传统的HTTP视图来看,你的请求是不可能的,因为HTTP就是不能那样工作。


为了高效的设计,你应该看看在缓存服务器上的样式表虽然 - 这肯定是值得的。

然而你的请求是合理的,这些天它是

越来越有可能。看看使用AJAX的方式真的是

添加到现有页面。这取决于客户端脚本

虽然。


Andy Dingley< di ***** @ codesmiths.com> ;写道:

但是你的请求是合理的,而且这些日子越来越有可能了。看看使用AJAX的方式确实是添加到现有页面。这取决于客户端脚本




替代方案可能是

来源与浏览器之间的内容组合。想法是服务器内的代理或过滤器

缓存原始内容并根据需要添加新的
内容。这可以用来避免在服务器上重复昂贵的处理,同时还避免使用浏览器 -

依赖脚本。

http: //www.eu.apachecon.com/konferen...ml#session-th7


-

Nick Kew


2006年4月25日02:43:04 -0700,在comp.text.xml中,Andy Dingley

< di **** *@codesmiths.com>" <二***** @ codesmiths.com>在

< 11 ********************** @ u72g2000cwu.googlegroups .com>写道:


Matt Silberstein写道:

但这是添加到现有页面,而不是替换它。


添加到现有页面的内容是什么?是什么意思?

这是网络。 HTTP工作,以便你得到一个新的页面(可能更大),虽然它_looks_喜欢旧的页面添加到
它的东西,它实际上是一个全新的页面制作全新的位和
字节。因此,从传统的HTTP视图来看,您的请求是不可能的,因为HTTP不会那样工作。

为了实现高效的设计,您应该在
服务器虽然 - 这当然值得做。

但是你的要求是合理的,而且这些日子越来越有可能了。看看使用AJAX的方式确实是添加到现有页面。这取决于客户端脚本




我不清楚,对不起。是的,它将是一个AJAX应用程序,已经有很多JavaScript了。我想要的是一些JavaScript方式来转换传入的xml
。这样我只需要维护一个代码

base,将数据转换为可显示的形式。我可以使用xslt

样式表作为首字母,但必须通过JavaScript进行更新(例如获得

新记录)。

-

Matt Silberstein


今天做一些关于达尔富尔种族灭绝的事情

http://www.beawitness.org
http://www.darfurgenocide.org
http://www.savedarfur.org


达尔富尔:种族灭绝我们可以停止

I have a data intensive web app I am developing. The core of the app
will do a db query and build a page. I plan on getting the data as xml
and feeding that and a xslt stylesheet to the browser. Here is my
question: the user can the request more data. I would like to somehow
use the same (or a version thereof) stylesheet to transform this new
data. But this is added to the existing page, not replacing it. Is
there a simple way to do this?

TIA.

--
Matt Silberstein

Do something today about the Darfur Genocide

http://www.beawitness.org
http://www.darfurgenocide.org
http://www.savedarfur.org

"Darfur: A Genocide We can Stop"

解决方案


Matt Silberstein wrote:

But this is added to the existing page, not replacing it.



What does "added to the existing page" mean?

This is the web. HTTP works so that you get a new page (which might be
bigger) and although it _looks_ like "the old page with things added to
it", it''s actually a whole new page made of entirely new bits and
bytes. So from the traditionalist HTTP view, your request is
impossible because HTTP just doesn''t work like that.

For good efficient design, you should look at caching the stylesheet on
the server though - that''s certainly worth doing.
However your request is a reasonable one and these days it''s
increasingly possible. Look at using AJAX for a way that really is
"adding to the existing page". This depends on client-side scripting
though.


Andy Dingley <di*****@codesmiths.com> wrote:

However your request is a reasonable one and these days it''s
increasingly possible. Look at using AJAX for a way that really is
"adding to the existing page". This depends on client-side scripting
though.



An alternative could be content assembly somewhere between the
origin and the browser. The idea being that a proxy, or a filter
within the server, caches the original contents and adds new
contents as necessary. This can be used to avoid repeating
expensive processing on the server, while also avoiding browser-
dependent scripting.

http://www.eu.apachecon.com/konferen...ml#session-th7

--
Nick Kew


On 25 Apr 2006 02:43:04 -0700, in comp.text.xml , "Andy Dingley
<di*****@codesmiths.com>" <di*****@codesmiths.com> in
<11**********************@u72g2000cwu.googlegroups .com> wrote:


Matt Silberstein wrote:

But this is added to the existing page, not replacing it.



What does "added to the existing page" mean?

This is the web. HTTP works so that you get a new page (which might be
bigger) and although it _looks_ like "the old page with things added to
it", it''s actually a whole new page made of entirely new bits and
bytes. So from the traditionalist HTTP view, your request is
impossible because HTTP just doesn''t work like that.

For good efficient design, you should look at caching the stylesheet on
the server though - that''s certainly worth doing.
However your request is a reasonable one and these days it''s
increasingly possible. Look at using AJAX for a way that really is
"adding to the existing page". This depends on client-side scripting
though.



I was not clear, sorry. Yes, it is going to be an AJAX app, there is
lots of JavaScript already. What I wanted was some JavaScript way to
transform the incoming xml. That way I only need to maintain one codes
base that turns the data to a displayable form. I can use a xslt
stylesheet for the initial, but would have to do the update (getting a
new record, for example) through JavaScript.
--
Matt Silberstein

Do something today about the Darfur Genocide

http://www.beawitness.org
http://www.darfurgenocide.org
http://www.savedarfur.org

"Darfur: A Genocide We can Stop"


这篇关于我可以使用xslt样式表来更新网页吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆