问题描述
你好,
我对XSL有点新意,我正在尝试执行以下操作:我有一个XML文件,其中包含许多配置文件(profile.xml)。我写了一个profile.xsl来将这些文件转换成一个很好的可读格式。现在,用户希望根据客户端上选择的配置文件过滤这些xml文件。我修改了我的profile.xsl文件,手工包含这个过滤器,它完美地运行。问题是我需要阅读这个过滤器。从外部文件(因为它可以更改),这是我尝试使用文档功能的地方。以下是我的文件的一些示例:
Profile.xml(缩写):
hello,
I''m a bit new to XSL and I''m trying to do the following: I have an XML file with a number of profiles in it (profile.xml). I wrote a profile.xsl to transform these files into a nice readable format. Now the user would like to filter these xml files based upon a profile of their choice on the client. I have modified my profile.xsl file to include this filter by hand and it works perfectly. The problem is that I need to read this "filter" from an external file (because it can change) and this is where I have tried to use the document function. Here are some examples of my files:
Profile.xml (shortened):
推荐答案
这篇关于在xsl:for-each - newbie中使用document()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!