Multiple file inputs?

后端 未结 6 942
天命终不由人
天命终不由人 2020-12-06 13:49

Within an XSLT document, is it possible to loop over a set of files in the current directory?

I have a situation where I have a directory full of xml files that need

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-06 13:53

    As others said, you cannot do it in a platform-independent way. In .NET world, you could create a custom XmlResolver so that document('dir://c:/foo/') would return the list of files in the 'c:\foo' directory in an arbitrary format you wish. See the following links for more information on custom XmlResolver's:

    Customizing the XmlUrlResolver Class
    The power of XmlResolver

    Also you may resort to using scripts (like the msxsl:script element) or extensions in your XSLT stylesheet.

    All these approaches will make your XSLT code unportable to other platforms.

提交回复
热议问题