2016-11-09 1 views
1

私は<p:xslt>のステップを持つXProcパイプラインをセットアップしました。このスタイルシートのパラメータAmoung、私は文書()ノードであるパラメータを持っている:XProcパイプラインのxsltにdocument()パラメータを渡す

これはkm_to_dita.xslスタイルシートです:

<?xml version="1.0" encoding="UTF-8"?> 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
    xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dctm="http://www.documentum.com" xmlns:ale="http://www.amplexor.com/alcatel" 
    exclude-result-prefixes="xs dctm ale" version="2.0"> 

    <xsl:param name="conf-base" select="'file:/D:/Temp/ALE_config/'" /> 

    <xsl:param name="output-base" select="''"/> 

    <xsl:param name="lang" select="/element()[1]/@language"/> 

    <xsl:param name="graphics-reference-names" as="document-node()*" /> 

    <!-- my templates stuff... --> 
</xsl:stylesheet> 

したがって、私はと私のパイプラインで、このXSLTを呼び出しています次のステップ(デモンストレーション目的のために、それが<p:inline>に設定されているが、ステップの結果ポートにバインドすることを目的としている):

<p:xslt name="km-dm-to-dita"> 
    <p:input port="source"> 
     <p:pipe port="list-dm" step="list-csv"/> 
    </p:input> 
    <p:input port="stylesheet"> 
     <p:document href="km_to_dita.xsl"/> 
    </p:input> 
    <p:with-param name="output-base" select="$dita.data-dir"/> 
    <p:with-param name="conf-base" select="$config-dir"/> 
    <!--<p:with-param name="graphics-reference-names"> 
     <p:pipe port="result" step="get-figure-references"/> 
    </p:with-param>--> 
    <p:with-param name="graphics-reference-names"> 
     <p:inline> 
      <graphic-ids> 
       <reference type="symbol" document="dm09011b0281121ef3.xml#G4" filename="g09011b0281d9c449.gif"/> 
       <reference type="symbol" document="dm09011b0281121ef3.xml#G3" filename="g09011b0281d9c449.gif"/> 
       <reference type="figure" document="dm09011b0281121ef3.xml#F33" filename="g09011b0281d9c44d.gif"/> 
       <reference type="symbol" document="dm09011b0281121ef3.xml#G5" filename="g09011b0281d9c451.gif"/> 
       <reference type="figure" document="dm09011b0281121ef5.xml#F116" filename="g09011b0281d9c458.gif"/> 
      </graphic-ids> 
     </p:inline> 
    </p:with-param> 

    <p:with-option name="output-base-uri" select="$dita.data-dir"/> 
</p:xslt> 

しかし、(oXygenXMLで)XMLひょうたんでそれを実行している場合、それは失敗し、 (申し訳ありません人々は、それは私が持っているすべての情報です)で提起されているエラーは、しかし)それは、このエラーが発生<p:with-param name="graphics-reference-names">だと判断しています

ヌル

任意のアイデア?

答えて

1

は私が最終的にそれと間違って何が起こっているのかい... in the XProc述べたようにまず第一に、<p:with-param>は、必要な@select属性が欠落しているが、不思議な酸素は私のパイプラインのための任意の検証エラーは発生しませんでした。

このようにパイプラインがそのように固定してもよい:

<p:with-param name="graphics-reference-names" select="/"> 
    <p:inline> 
     <graphic-ids> 
      <reference type="symbol" document="dm09011b0281121ef3.xml#G4" filename="g09011b0281d9c449.gif"/> 
      <reference type="symbol" document="dm09011b0281121ef3.xml#G3" filename="g09011b0281d9c449.gif"/> 
      <reference type="figure" document="dm09011b0281121ef3.xml#F33" filename="g09011b0281d9c44d.gif"/> 
      <reference type="symbol" document="dm09011b0281121ef3.xml#G5" filename="g09011b0281d9c451.gif"/> 
      <reference type="figure" document="dm09011b0281121ef5.xml#F116" filename="g09011b0281d9c458.gif"/> 
     </graphic-ids> 
    </p:inline> 
</p:with-param> 

上記の解決策では、パラメータは文字列にキャストされているため、XSLTは失敗します。

変数$の値の必須アイテムタイプgraphics-reference-namesはdocument-node()です。供給された値は、アイテム・タイプxsを有する:列

これは解けない問題になる他の問題である:XPROCはXSLT with XProc - parameter binding in the required typeで説明したように唯一のパラメータは、アトミック値として設定されることを可能にします。

関連する問題