在将url与file:协议一起使用时,为什么url-generator不保留xml注释?

时间:2019-01-25 01:48:52

标签: orbeon

我正在使用orbeon-cli.jar调用管道。当前版本为3.8。但是,在此过程中,我的xml文件不再具有xml注释。我根据announcement升级到orbeon 3.9,即“ Orbeon Forms现在在XPL和XForms引擎中具有XML / HTML注释支持。”实际上确实如此,但是以一种奇怪的方式。

我将过程简化为一个简单的xpl文件,该文件仅读取xml文件并将其记录下来。这是我的测试: 1.我在以下位置使用相对路径:正如预期的那样,输出xml具有xml注释。

<p:processor name="oxf:url-generator">
      <p:input name="config">
          <config>
              <url>export.xml</url>
          </config>
      </p:input>
      <p:output name="data" id="main-input"/>
  </p:processor>
  <p:processor name="oxf:xml-converter">
       <p:input name="config">
           <config>
               <encoding>utf-8</encoding>
           </config>
       </p:input>
       <p:input name="data" href="#main-input"/>
       <p:output name="data" id="input-converted"/>
  </p:processor> 
  <p:processor name="oxf:file-serializer">
    <p:input name="config">
        <config>
          <file>file_written_relative_path.xml</file>
        </config>
    </p:input>
    <p:input name="data" href="#input-converted"/>
  </p:processor>
  1. 但是实际上,我们需要的是的绝对路径,如:
<p:processor name="oxf:url-generator">
    <p:input name="config">
        <config>
          <url>file:///D:/path/to/file/export.xml</url>
          <mode>xml</mode>
          <encoding>utf-8</encoding>
          <force-encoding>true</force-encoding>
          <content-type>application/xml</content-type>
          <force-content-type>true</force-content-type>
          <handle-lexical>true</handle-lexical><!-- 'true' is the default value anyway -->
          <cache-control>
            <use-local-cache>false</use-local-cache>
          </cache-control>
        </config>
    </p:input>
    <p:output name="data" id="main-input-absolute"/>
  </p:processor>

  <p:processor name="oxf:xml-converter">
       <p:input name="config">
           <config>
               <encoding>utf-8</encoding>
           </config>
       </p:input>
       <p:input name="data" href="#main-input-absolute"/>
       <p:output name="data" id="input-absolute-converted"/>
  </p:processor> 
  <p:processor name="oxf:file-serializer">
    <p:input name="config">
        <config>
          <file>file_written_absolute_path.xml</file>
        </config>
    </p:input>
    <p:input name="data" href="#input-absolute-converted"/>
  </p:processor>

在我看来,在这种情况下,“ URL生成器”似乎有不同的加载文件的方法。即使我在[2]中尝试了url-generator的所有可能的配置,它也没有像[1]中那样保留所有注释。为什么不呢?是虫子吗?有什么办法可以解决?还是在其他地方可以配置它?

0 个答案:

没有答案