是否有使用XSLT创建网站的点 [英] Is there a point creating a site using XSLT

查看:120
本文介绍了是否有使用XSLT创建网站的点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这种技术是否仍然很受欢迎?



我想创建一个自动转换XSLT文件的网站。它应该这样工作:
当用户访问站点时,单个处理程序将接受他的请求,然后找到一个合适的XML(根据请求的URL),并使用其附加的XSL文件进行转换。 p>

我想这样做,以便使用纯XML文件(而不是使用一个成熟的和昂贵的CMS系统)更新网站很容易。



你说什么?好主意?馊主意?任何人都有建议?



谢谢!

解决方案

语法是硬是没有答案在所有imho。一个)。它真的不是,和B)。你应该是一个程序员,只是学习它。



绝对其他技术正在推进XSLT自2005年以来没有,但它仍然是一个强大的工具给你一个抽象级别,例如asp.net webforms不能,并允许你提供一个通用的可扩展的解决方案,以一系列的输出格式串行化。很容易用任何给定的语言生成HTML,现在很难将其扩展为XML,现在将其扩展为JSON,现在将其扩展为CSV。



缓存的转换在一个仍然是I / O绑定的环境中足够快。



OTOH,在XML中存储数据通常不是一个好主意。根据上述所有原因,更好地存储在DB / mem和serialise中。


Is this technology still popular?

I want to make a website which automatically transforms XSLT files. It should work like this: When a user accesses the site, a single handler would accept his request and then find a suitable XML for it (according to the URL requested) and transform it using its attached XSL file.

I want to do this in order to make it easy to update the site using plain XML files (instead of using a full-fledged & expensive CMS system).

What do you say? good idea? bad idea? anyone has a recommendation?

Thanks!

解决方案

Answers based on "the syntax is hard" is no answer at all imho. A). It really isn't, and B). You're supposed to be a programmer, just learn it.

Definitely other technologies are advancing at a pace XSLT hasn't since 2005ish, but it remains a powerful tool which gives you a level of abstraction that, say, asp.net webforms don't, and allows you to provide a general scalable solution to trivially serialise to a range of output formats. It's easy to generate HTML with any given language, it's harder to now extend that to XML, now extend that to JSON, now extend that to CSV.

And cached transforms are plenty fast enough in an environment which is still I/O bound.

OTOH, storing data in XML is generally not a good idea. Far better to store in a DB/mem and serialise as required for all the reasons above.

这篇关于是否有使用XSLT创建网站的点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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