Read a remote zipped xml with just XSL

后端 未结 5 1683
北海茫月
北海茫月 2020-12-16 08:00

I want to know if it\'s possible for an XSLT file to read data from an XML located within folders of a remote zip(from the server at work), without any external processors (

5条回答
  •  鱼传尺愫
    2020-12-16 08:13

    I don't think there is a general way of doing that.

    However, in many Java-based XSLT processors (at least Saxon and Xalan), you can use 'jar:' URLs to refer to resources inside zip files. Prefix the URL pointing to the zip file with jar: and suffix it with !/ and the path to the file inside it. Like this: jar:file:///the/path/to/foo.zip!/foo.xml.

    To achieve the same in other processors, you would probably need figure out if they allow registering a custom "URI handler" or an equivalent to deal with the special URIs you want to support.

提交回复
热议问题