• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

通过ASP或XSL过滤XML?

用户头像
it1352
帮助1

问题说明



我了解我的基础知识,完全无法实现.

我有一个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>

正确答案

#1
您不需要为每个过滤器使用单独的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
系列文章
更多 icon
同类精品
更多 icon
继续加载