通过ASP或XSL过滤XML?
问题说明
我了解我的基础知识,完全无法实现.
我有一个projects.xml文件,其中包含我所有客户项目的列表.
默认情况下,我的网页应显示所有项目,或按项目名称或客户过滤项目.
我想知道应用过滤器时的最佳做法:
-对每个过滤器应用不同的xsl
-使用asp访问xml并过滤信息,然后再将其发送到xsl
如果我需要为客户A选择所有项目,我应该使用XL函数(for-each)还是ASP使用DOM函数?
xml的示例:
Hi,
I know my basics and I have difficulties implementing it altogether.
I have a projects.xml file containing the list of all my customers projects.
My web page should by default show all projects, or filter projects by project Name or Customer.
I want to know what is best practice when applying my filters:
- apply a different xsl to each filter
- use asp to access xml and filter the info before it is sent to xsl
if I need to select all the projects for Customer A, would I use xls (for-each) or ASP using DOM functions?
Example of the xml:
<projects>
<project>
<projname>Project A1</projname>
<customer>A</customer>
</project>
<project>
<projname>Project A2</projname>
<customer>A</customer>
</project>
<project>
<projname>Project B</projname>
<customer>B</customer>
</project>
</projects>
正确答案
您不需要为每个过滤器使用单独的XSLT.将参数传递给XSLT
http://projects.ischool.washington.edu/tabrooks/545/ContentManagement/PassingParameters.htm [^ ]
You don''t need seperate XSLT for each filter. Pass a parameter to the XSLT
http://projects.ischool.washington.edu/tabrooks/545/ContentManagement/PassingParameters.htm[^]
这篇好文章是转载于:学新通技术网
- 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
- 本站站名: 学新通技术网
- 本文地址: /reply/detail/tanhcfhikh
-
YouTube API 不能在 iOS (iPhone/iPad) 工作,但在桌面浏览器工作正常?
it1352 07-30 -
iPhone,一张图像叠加到另一张图像上以创建要保存的新图像?(水印)
it1352 07-17 -
保持在后台运行的 iPhone 应用程序完全可操作
it1352 07-25 -
使用 iPhone 进行移动设备管理
it1352 07-23 -
在android同时打开手电筒和前置摄像头
it1352 09-28 -
扫描 NFC 标签时是否可以启动应用程序?
it1352 08-02 -
检查邮件是否发送成功
it1352 07-25 -
Android微调工具-删除当前选择
it1352 06-20 -
希伯来语的空格句子标记化错误
it1352 06-22 -
Android App 和三星 Galaxy S4 不兼容
it1352 07-20