使用XSL的result-document标签进行XML到HTML转换未能产生所需的结果。

huangapple go评论80阅读模式
英文:

XML to HTML Conversion using XSL result-document tag in XSL not giving required result

问题

我们已经将 redirect:write(从 XSLT-1.0 使用 Xalan) 替换为 result-document (XSLT-2.0 Saxon 处理器)。

之前使用 redirect:write 用于获取3个输出的HTML,从一个HTML可以通过点击上面的链接导航到另一个HTML。
现在使用 result-document,我们只获取一个单独的HTML,而且在一个HTML中包含了所有3个HTML的数据。此外,点击链接时会显示无法访问,因为其余的HTML没有生成。

以下是XSL文件的代码:

<?xml version="1.0"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:plm="http://www.plmxml.org/Schemas/PLMXMLSchema"
xmlns:lxslt="http://www.apache.org/xslt"
xmlns:setfile="com.teamcenter.rac.cme.cmereport.CMEReportXalanExtension">

<xsl:key name="Occurrence" match="plm:Occurrence | plm:WorkAreaOccurrence" use="@id"/>
<xsl:key name="Operation" match="plm:Operation" use="@id"/>
<xsl:key name="OperationRevision" match="plm:OperationRevision" use="@id"/>
<xsl:key name="Process" match="plm:Process | plm:Operation" use="@id"/>
<xsl:key name="ProcessOccurrence" match="plm:ProcessOccurrence | plm:Occurrence | plm:WorkAreaOccurrence" use="@id"/>
<xsl:key name="ProcessRevision" match="plm:ProcessRevision | plm:OperationRevision" use="@id"/>
<xsl:key name="ProcessView" match="plm:ProcessView" use="@id"/>
<xsl:key name="ProcOpRevision" match="plm:ProcessRevision | plm:OperationRevision" use="@id"/>

<lxslt:component prefix="setfile" elements="copy" functions="setFile setTcFile getCurrentDir
getCurrentImanFileName getCurrentImanFileNamePrefix getNiceName">
  <lxslt:script lang="javaclass" src="com.teamcenter.rac.cme.cmereport.CMEReportXalanExtension"/>
</lxslt:component>

<xsl:output method="html" indent="yes"/>
<xsl:param name="outDir" select="setfile:getCurrentDir(setfile:new())"/>
<xsl:variable name="roid" select="/plm:PLMXML/plm:ProcessView/@rootRefs"/><!-- rootRef instead of prima.. -->
<!-- Assuming that the primaryOccurrenceRef(& NO MULTIPLE ENTRY POINTS) is always a ProcessOccurrence -->
<xsl:variable name="rpoe" select="key('ProcessOccurrence',$roid)"/>
<xsl:variable name="rprid" select="substring-after($rpoe/@instancedRef,'#')"/>
<xsl:variable name="root" select="key('ProcessRevision',$rprid)"/>

<xsl:template match="/">
    <xsl:call-template name="genData">
        <xsl:with-param name="curProc" select="$root"/>
        <xsl:with-param name="occStr" select="$rpoe/@occurrenceRefs"/>
    </xsl:call-template>
</xsl:template>

<xsl:template name="genData">
<xsl:param name="curProc"/>
<xsl:param name="occStr">
    <html>
        <head>
            <title>Process: <xsl:value-of select="$curProc/@name"/></title>
        </head>
        <body BGCOLOR="#FFFFFF" link="#0000FF" vlink="#660066">
            <br/>
                        <!-- Support for Foxfire browser requires specific class="sample" on all table elements -->
            <table class="sample"><!-- main table -->
                <xsl:call-template name="heading">
                    <xsl:with-param name="title" select="'Process Report'"/>
                </xsl:call-template>
                                <tr>
                                        <td>
                                                <xsl:variable name="procid">
                                                        <xsl:call-template name="cleanId">
                                                                <xsl:with-param name="id" select="$curProc/@masterRef"/>
                                                        </xsl:call-template>
                                                </xsl:variable>
                                                <xsl:variable name="proc" select="key('Process',$procid)"/>
                                                <xsl:value-of select="concat($proc/@catalogueId,'/',$curProc/@revision,' - ',$curProc/@name)"/>
                                        </td>
                                </tr>

                <tr><!-- main table:row6::sub level -->
                    <td>
                        <hr color="#000000"/>
                        <table class="sample">
                        <tr>
                            <th>Name</th>
                        </tr>
                        <xsl:call-template name="createCL">
                            <xsl:with-param name="chStr" select="$occStr"/>
                        </xsl:call-template>
                        </table>
                    </td>
                </tr>
            </table>
        </body>
    </html>
</xsl:template>

<xsl:template name="createCL">
<xsl:param name="chStr"/>
    <xsl:variable name="genele" select="key('ProcessOccurrence',$chStr)"/>
                <xsl:if test="name($genele)='ProcessOccurrence'">
                    <xsl:call-template name="creCLext">
                        <xsl:with-param name="genel" select="$genele"/>
                    </xsl:call-template>
                </xsl:if>
</xsl:template>

<xsl:template name="creCLext">
<xsl:param name="genel"/>
    <xsl:variable name="procid" select="substring-after($genel/@instancedRef,'#')"/>
    <xsl:variable name="procele" select="key('ProcOpRevision',$procid)"/><!-- ProcessRevision or OperationRevision -->
    <xsl:variable name="pre1" select="substring-after($genel/@predecessorRefs,'#')"/><!--assuming only one id to be present -->
    <xsl:variable name="pre2" select="key('ProcessOccurrence',$pre1)"/>
    <xsl:variable name="preid" select="substring-after($pre2/@instancedRef,'#')"/>
    <xsl:variable name="prele" select="/plm:PLMXML/*[@id=$preid]"/>
    <tr>
    <td align="center"><a>
        <xsl:attribute name="href">
            <xsl:value-of select="concat($procid,'.html')"/>
        </xsl:attribute>
        <xsl:value-of select="$procele/@name"/>
    </a></td>
     
    </tr>
    <result-document href="concat($procid,'.html')">
    <xsl:call-template name="genopr">
                <xsl:with-param name="curOpr" select="$procele"/>
                <xsl:with-param name="genel"

<details>
<summary>英文:</summary>

We have replaced redirect:write(From XSLT -1.0 with Xalan) with result-document (XSLT-2.0 Saxon processor).

Earlier using redirect:write were used to get 3 output HTMLs, from one HTML we can navigate to another HTML by clicking links available on them.
Now with result-document, we only get single HTML and in single HTML only has all the data of all 3 HTMLs. Also on click of links it says can&#39;t reach because remaining HTMLs are not generated.

Below is the Code for XSL File

    &lt;?xml version=&quot;1.0&quot;?&gt;
    &lt;xsl:stylesheet version=&quot;2.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;
    xmlns:plm=&quot;http://www.plmxml.org/Schemas/PLMXMLSchema&quot;
    xmlns:lxslt=&quot;http://www.apache.org/xslt&quot;
    xmlns:setfile =&quot;com.teamcenter.rac.cme.cmereport.CMEReportXalanExtension&quot;&gt;
    
    &lt;xsl:key name=&quot;Occurrence&quot; match=&quot;plm:Occurrence | plm:WorkAreaOccurrence&quot; use=&quot;@id&quot;/&gt;
    &lt;xsl:key name=&quot;Operation&quot; match=&quot;plm:Operation&quot; use=&quot;@id&quot;/&gt;
    &lt;xsl:key name=&quot;OperationRevision&quot; match=&quot;plm:OperationRevision&quot; use=&quot;@id&quot;/&gt;
    &lt;xsl:key name=&quot;Process&quot; match=&quot;plm:Process | plm:Operation&quot; use=&quot;@id&quot;/&gt;
    &lt;xsl:key name=&quot;ProcessOccurrence&quot; match=&quot;plm:ProcessOccurrence | plm:Occurrence | plm:WorkAreaOccurrence&quot; use=&quot;@id&quot;/&gt;
    &lt;xsl:key name=&quot;ProcessRevision&quot; match=&quot;plm:ProcessRevision | plm:OperationRevision&quot; use=&quot;@id&quot;/&gt;
    &lt;xsl:key name=&quot;ProcessView&quot; match=&quot;plm:ProcessView&quot; use=&quot;@id&quot;/&gt;
    &lt;xsl:key name=&quot;ProcOpRevision&quot; match=&quot;plm:ProcessRevision | plm:OperationRevision&quot; use=&quot;@id&quot;/&gt;
    
    &lt;lxslt:component prefix=&quot;setfile&quot; elements=&quot;copy&quot; functions=&quot;setFile setTcFile getCurrentDir
            getCurrentImanFileName getCurrentImanFileNamePrefix getNiceName&quot;&gt;
      &lt;lxslt:script lang=&quot;javaclass&quot; src=&quot;com.teamcenter.rac.cme.cmereport.CMEReportXalanExtension&quot;/&gt;
    &lt;/lxslt:component&gt;
    
    &lt;xsl:output method=&quot;html&quot; indent=&quot;yes&quot;/&gt;
    &lt;xsl:param name=&quot;outDir&quot; select=&quot;setfile:getCurrentDir(setfile:new())&quot;/&gt;
    &lt;xsl:variable name=&quot;roid&quot; select=&quot;/plm:PLMXML/plm:ProcessView/@rootRefs&quot;/&gt;&lt;!-- rootRef instead of prima.. --&gt;
    &lt;!-- Assuming that the primaryOccurrenceRef(&amp; NO MULTIPLE ENTRY POINTS) is always a ProcessOccurrence --&gt;
    &lt;xsl:variable name=&quot;rpoe&quot; select=&quot;key(&#39;ProcessOccurrence&#39;,$roid)&quot;/&gt;
    &lt;xsl:variable name=&quot;rprid&quot; select=&quot;substring-after($rpoe/@instancedRef,&#39;#&#39;)&quot;/&gt;
    &lt;xsl:variable name=&quot;root&quot; select=&quot;key(&#39;ProcessRevision&#39;,$rprid)&quot;/&gt;
    
    &lt;xsl:template match=&quot;/&quot;&gt;
        &lt;xsl:call-template name=&quot;genData&quot;&gt;
            &lt;xsl:with-param name=&quot;curProc&quot; select=&quot;$root&quot;/&gt;
            &lt;xsl:with-param name=&quot;occStr&quot; select=&quot;$rpoe/@occurrenceRefs&quot;/&gt;
        &lt;/xsl:call-template&gt;
    &lt;/xsl:template&gt;
    
    &lt;xsl:template name=&quot;genData&quot;&gt;
    &lt;xsl:param name=&quot;curProc&quot;/&gt;
    &lt;xsl:param name=&quot;occStr&quot;/&gt;
        &lt;html&gt;
            &lt;head&gt;
                &lt;title&gt;Process: &lt;xsl:value-of select=&quot;$curProc/@name&quot;/&gt;&lt;/title&gt;
            &lt;/head&gt;
            &lt;body BGCOLOR=&quot;#FFFFFF&quot; link=&quot;#0000FF&quot; vlink=&quot;#660066&quot;&gt;
                &lt;br/&gt;
                            &lt;!-- Support for Foxfire browser requires specific class=&quot;sample&quot; on all table elements --&gt;
                &lt;table class=&quot;sample&quot;&gt;&lt;!-- main table --&gt;
                    &lt;xsl:call-template name=&quot;heading&quot;&gt;
                        &lt;xsl:with-param name=&quot;title&quot; select=&quot;&#39;Process Report&#39;&quot;/&gt;
                    &lt;/xsl:call-template&gt;
                                    &lt;tr&gt;
                                            &lt;td&gt;
                                                    &lt;xsl:variable name=&quot;procid&quot;&gt;
                                                            &lt;xsl:call-template name=&quot;cleanId&quot;&gt;
                                                                    &lt;xsl:with-param name=&quot;id&quot; select=&quot;$curProc/@masterRef&quot;/&gt;
                                                            &lt;/xsl:call-template&gt;
                                                    &lt;/xsl:variable&gt;
                                                    &lt;xsl:variable name=&quot;proc&quot; select=&quot;key(&#39;Process&#39;,$procid)&quot;/&gt;
                                                    &lt;xsl:value-of select=&quot;concat($proc/@catalogueId,&#39;/&#39;,$curProc/@revision,&#39; - &#39;,$curProc/@name)&quot;/&gt;
                                            &lt;/td&gt;
                                    &lt;/tr&gt;
    
                    &lt;tr&gt;&lt;!-- main table:row6::sub level --&gt;
                        &lt;td&gt;
                            &lt;hr color=&quot;#000000&quot;/&gt;
                            &lt;table class=&quot;sample&quot;&gt;
                            &lt;tr&gt;
                                &lt;th&gt;Name&lt;/th&gt;
                            &lt;/tr&gt;
                            &lt;xsl:call-template name=&quot;createCL&quot;&gt;
                                &lt;xsl:with-param name=&quot;chStr&quot; select=&quot;$occStr&quot;/&gt;
                            &lt;/xsl:call-template&gt;
                            &lt;/table&gt;
                        &lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/table&gt;
            &lt;/body&gt;
        &lt;/html&gt;
    &lt;/xsl:template&gt;
    
    &lt;xsl:template name=&quot;createCL&quot;&gt;
    &lt;xsl:param name=&quot;chStr&quot;/&gt;
        &lt;xsl:variable name=&quot;genele&quot; select=&quot;key(&#39;ProcessOccurrence&#39;,$chStr)&quot;/&gt;
                    &lt;xsl:if test=&quot;name($genele)=&#39;ProcessOccurrence&#39;&quot;&gt;
                        &lt;xsl:call-template name=&quot;creCLext&quot;&gt;
                            &lt;xsl:with-param name=&quot;genel&quot; select=&quot;$genele&quot;/&gt;
                        &lt;/xsl:call-template&gt;
                    &lt;/xsl:if&gt;
    &lt;/xsl:template&gt;
    
    &lt;xsl:template name=&quot;creCLext&quot;&gt;
    &lt;xsl:param name=&quot;genel&quot;/&gt;
        &lt;xsl:variable name=&quot;procid&quot; select=&quot;substring-after($genel/@instancedRef,&#39;#&#39;)&quot;/&gt;
        &lt;xsl:variable name=&quot;procele&quot; select=&quot;key(&#39;ProcOpRevision&#39;,$procid)&quot;/&gt;&lt;!-- ProcessRevision or OperationRevision --&gt;
        &lt;xsl:variable name=&quot;pre1&quot; select=&quot;substring-after($genel/@predecessorRefs,&#39;#&#39;)&quot;/&gt;&lt;!--assuming only one id to be present --&gt;
        &lt;xsl:variable name=&quot;pre2&quot; select=&quot;key(&#39;ProcessOccurrence&#39;,$pre1)&quot;/&gt;
        &lt;xsl:variable name=&quot;preid&quot; select=&quot;substring-after($pre2/@instancedRef,&#39;#&#39;)&quot;/&gt;
        &lt;xsl:variable name=&quot;prele&quot; select=&quot;/plm:PLMXML/*[@id=$preid]&quot;/&gt;
        &lt;tr&gt;
        &lt;td align=&quot;center&quot;&gt;&lt;a&gt;
            &lt;xsl:attribute name=&quot;href&quot;&gt;
                &lt;xsl:value-of select=&quot;concat($procid,&#39;.html&#39;)&quot;/&gt;
            &lt;/xsl:attribute&gt;
            &lt;xsl:value-of select=&quot;$procele/@name&quot;/&gt;
        &lt;/a&gt;&lt;/td&gt;
         
        &lt;/tr&gt;
        &lt;result-document href=&quot;concat($procid,&#39;.html&#39;)&quot;&gt;
        &lt;xsl:call-template name=&quot;genopr&quot;&gt;
                    &lt;xsl:with-param name=&quot;curOpr&quot; select=&quot;$procele&quot;/&gt;
                    &lt;xsl:with-param name=&quot;genel&quot; select=&quot;$genel&quot;/&gt;
                &lt;/xsl:call-template&gt;
        &lt;/result-document&gt;
    &lt;/xsl:template&gt;
    
    &lt;xsl:template name=&quot;genopr&quot;&gt;
    &lt;xsl:param name=&quot;curOpr&quot;/&gt;
    &lt;xsl:param name=&quot;genel&quot;/&gt;
        &lt;html&gt;
            &lt;head&gt;
                &lt;title&gt;Operation: &lt;xsl:value-of select=&quot;$curOpr/@name&quot;/&gt;&lt;/title&gt;
            &lt;/head&gt;
            &lt;body BGCOLOR=&quot;#FFFFFF&quot; link=&quot;#0000FF&quot; vlink=&quot;#660066&quot;&gt;
                &lt;br/&gt;
                &lt;table class=&quot;sample&quot;&gt;&lt;!-- main table --&gt;
                    &lt;xsl:call-template name=&quot;heading&quot;&gt;
                        &lt;xsl:with-param name=&quot;title&quot; select=&quot;&#39;Operation Report&#39;&quot;/&gt;
                    &lt;/xsl:call-template&gt;
                                    &lt;tr&gt;
                                            &lt;td&gt;
                                                    &lt;xsl:variable name=&quot;procid&quot;&gt;
                                                            &lt;xsl:call-template name=&quot;cleanId&quot;&gt;
                                                                    &lt;xsl:with-param name=&quot;id&quot; select=&quot;$curOpr/@masterRef&quot;/&gt;
                                                            &lt;/xsl:call-template&gt;
                                                    &lt;/xsl:variable&gt;
                                                    &lt;xsl:variable name=&quot;proc&quot; select=&quot;key(&#39;Process&#39;,$procid)&quot;/&gt;
                                                    &lt;xsl:value-of select=&quot;concat($proc/@catalogueId,&#39;/&#39;,$curOpr/@revision,&#39; - &#39;,$curOpr/@name)&quot;/&gt;
                                            &lt;/td&gt;
                                    &lt;/tr&gt;
                    
                &lt;/table&gt;
            &lt;/body&gt;
        &lt;/html&gt;
    
    &lt;/xsl:template&gt;
    
    &lt;xsl:template name=&quot;heading&quot;&gt;
    &lt;xsl:param name=&quot;title&quot;/&gt;
                    &lt;tr&gt;&lt;!-- main table:row1::heading--&gt;
                        &lt;th&gt;
                            &lt;div align=&quot;left&quot;&gt;
                            &lt;/div&gt;
                            &lt;div align=&quot;center&quot;&gt;&lt;b&gt;&lt;font size=&quot;+2&quot;&gt;&lt;xsl:value-of select=&quot;$title&quot;/&gt;&lt;/font&gt;&lt;/b&gt;&lt;/div&gt;&lt;br/&gt;
                        &lt;/th&gt;
                    &lt;/tr&gt;
    &lt;/xsl:template&gt;
    &lt;xsl:template name=&quot;cleanId&quot;&gt;
        &lt;xsl:param name=&quot;id&quot;/&gt;
    
        &lt;xsl:choose&gt;
            &lt;xsl:when test=&quot;contains($id, &#39;#&#39;)&quot;&gt;
                &lt;xsl:value-of select=&quot;substring-after($id,&#39;#&#39;)&quot;/&gt;
            &lt;/xsl:when&gt;
            &lt;xsl:otherwise&gt;
                &lt;xsl:value-of select=&quot;$id&quot;/&gt;
            &lt;/xsl:otherwise&gt;
        &lt;/xsl:choose&gt;
    &lt;/xsl:template&gt;
    
    &lt;/xsl:stylesheet&gt;

Below is the the code where we are calling the transformer for conversion from XML to HTML.

    {
             

            // 1. Instantiate a TransformerFactory.
            javax.xml.transform.TransformerFactory tFactory =(SAXTransformerFactory) SAXTransformerFactory.newInstance();

            XslImportResolver myResolve = new XslImportResolver();
            tFactory.setURIResolver( myResolve );

            // 2. Use the TransformerFactory to process the stylesheet Source and
            //                generate a Transformer.
            javax.xml.transform.Transformer transformer = tFactory.newTransformer
                            (new javax.xml.transform.stream.StreamSource(xslLocation));

            // Add debugging output if it is definded in the Registry.
            Registry registry = Registry.getRegistry( this );

            // 3. Use the Transformer to perform the transformation and send the
            //          the output to a Result object.
            transformer.transform( new StreamSource( xmlLocation ),
                    new StreamResult( new FileOutputStream( htmlLocation ) ) );
        }


Here is the XML (Partial) input for the Conversion

        &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
    &lt;PLMXML xmlns=&quot;http://www.plmxml.org/Schemas/PLMXMLSchema&quot;
     language=&quot;en-us&quot; time=&quot;13:52:21&quot; schemaVersion=&quot;6&quot;&gt;
    &lt;Header id=&quot;id1&quot; traverseRootRefs=&quot;#id6&quot; transferContext=&quot;tcm_export&quot;&gt;&lt;/Header&gt;
    &lt;Process id=&quot;id20&quot; name=&quot;PlantBOp_rediined&quot; subType=&quot;Mfg0MEPlantBOP&quot; accessRefs=&quot;#id13&quot; catalogueId=&quot;002927&quot;&gt;
    &lt;ApplicationRef application=&quot;applicationName&quot; label=&quot;AfiRcExBJ_LsEB&quot; version=&quot;AfiRcExBJ_LsEB&quot;&gt;&lt;/ApplicationRef&gt;&lt;/Process&gt;
    &lt;Operation id=&quot;id41&quot; name=&quot;OP&quot; subType=&quot;MEOP&quot; accessRefs=&quot;#id13&quot; catalogueId=&quot;002929&quot;&gt;
    &lt;ApplicationRef application=&quot;applicationName&quot; label=&quot;wvtRcExBJ_LsEB&quot; version=&quot;wvtRcExBJ_LsEB&quot;&gt;&lt;/ApplicationRef&gt;&lt;/Operation&gt;
    &lt;Process id=&quot;id45&quot; name=&quot;process_station&quot; subType=&quot;Mfg0MEProcStatn&quot; accessRefs=&quot;#id13&quot; catalogueId=&quot;002928&quot;&gt;
    &lt;ApplicationRef application=&quot;applicationName&quot; label=&quot;gTqRcExBJ_LsEB&quot; version=&quot;gTqRcExBJ_LsEB&quot;&gt;&lt;/ApplicationRef&gt;&lt;/Process&gt;
    &lt;ProcessRevision id=&quot;id18&quot; name=&quot;PlantBOp_rediined&quot; subType=&quot;Mfg0MEPlantBOPRevision&quot; accessRefs=&quot;#id13&quot; masterRef=&quot;#id20&quot; revision=&quot;A&quot;&gt;
    &lt;ApplicationRef application=&quot;applicationName&quot; label=&quot;AfiRcExBJ_LsEB&quot; version=&quot;AfpRcExBJ_LsEB&quot;&gt;&lt;/ApplicationRef&gt;
    &lt;/ProcessRevision&gt;
    &lt;OperationRevision id=&quot;id39&quot; name=&quot;OP&quot; subType=&quot;MEOPRevision&quot; accessRefs=&quot;#id13&quot; masterRef=&quot;#id41&quot; revision=&quot;A&quot;&gt;
    &lt;ApplicationRef application=&quot;applicationName&quot; label=&quot;wvtRcExBJ_LsEB&quot; version=&quot;wzjRcExBJ_LsEB&quot;&gt;&lt;/ApplicationRef&gt;
    &lt;/OperationRevision&gt;
    &lt;ProcessRevision id=&quot;id43&quot; name=&quot;process_station&quot; subType=&quot;Mfg0MEProcStatnRevision&quot; accessRefs=&quot;#id13&quot; masterRef=&quot;#id45&quot; revision=&quot;A&quot;&gt;
    &lt;ApplicationRef application=&quot;applicationName&quot; label=&quot;gTqRcExBJ_LsEB&quot; version=&quot;gXgRcExBJ_LsEB&quot;&gt;&lt;/ApplicationRef&gt;
    &lt;/ProcessRevision&gt;
    &lt;ProcessView id=&quot;id4&quot; ruleRefs=&quot;#id2&quot; rootRefs=&quot;id6&quot; primaryOccurrenceRef=&quot;id8&quot;&gt;
    &lt;ApplicationRef application=&quot;applicationName&quot; label=&quot;AjiRcExBJ_LsEB/QkqRjxIVJ_LsEB/AAAAAAAAAAAAAA/BOM/&quot;&gt;&lt;/ApplicationRef&gt;
    &lt;ProcessOccurrence id=&quot;id6&quot; instancedRef=&quot;#id43&quot; associatedAttachmentRefs=&quot;#id23 #id26&quot; occurrenceRefs=&quot;id28&quot; parentRef=&quot;#id8&quot;&gt;
    &lt;ApplicationRef application=&quot;applicationName&quot; label=&quot;AjiRcExBJ_LsEB/gfuRcExBJ_LsEB/&quot;&gt;&lt;/ApplicationRef&gt;
    &lt;Transform id=&quot;id5&quot;&gt;1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1&lt;/Transform&gt;
    &lt;AttributeContext id=&quot;id21&quot; attributeName=&quot;AO_ID&quot; contextRef=&quot;#id8&quot;&gt;&lt;/AttributeContext&gt;&lt;/ProcessOccurrence&gt;
    &lt;ProcessOccurrence id=&quot;id8&quot; instancedRef=&quot;#id18&quot; associatedAttachmentRefs=&quot;#id11 #id17&quot; occurrenceRefs=&quot;id6&quot;&gt;
    &lt;ApplicationRef application=&quot;applicationName&quot; label=&quot;AjiRcExBJ_LsEB/&quot;&gt;&lt;/ApplicationRef&gt;
    &lt;Transform id=&quot;id7&quot;&gt;1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1&lt;/Transform&gt;
    &lt;AttributeContext id=&quot;id9&quot; attributeName=&quot;AO_ID&quot; contextRef=&quot;#id8&quot;&gt;&lt;/AttributeContext&gt;&lt;/ProcessOccurrence&gt;
    &lt;ProcessOccurrence id=&quot;id28&quot; instancedRef=&quot;#id39&quot; associatedAttachmentRefs=&quot;#id31 #id34 #id42&quot; parentRef=&quot;#id6&quot; configuredActivityRootRef=&quot;#id37&quot;&gt;
    &lt;ApplicationRef application=&quot;applicationName&quot; label=&quot;AjiRcExBJ_LsEB/BAqRcExBJ_LsEB/gfuRcExBJ_LsEB/&quot;&gt;&lt;/ApplicationRef&gt;
    &lt;Transform id=&quot;id27&quot;&gt;1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1&lt;/Transform&gt;
    &lt;AttributeContext id=&quot;id29&quot; attributeName=&quot;AO_ID&quot; contextRef=&quot;#id8&quot;&gt;&lt;/AttributeContext&gt;&lt;/ProcessOccurrence&gt;&lt;/ProcessView&gt;
    &lt;/PLMXML&gt;

we want output file in such a way that user will be able to navigate in it.
In shorter replacement for redirect-write. 

</details>


# 答案1
**得分**: 1

&lt;result-document href=&quot;concat($procid,'.html')&quot;&gt;

&lt;/result-document&gt;

 

应该是

&lt;xsl:result-document href=&quot;concat($procid,'.html')&quot;&gt;

&lt;/xsl:result-document&gt;

<details>
<summary>英文:</summary>

    &lt;result-document href=&quot;concat($procid,&#39;.html&#39;)&quot;&gt;
    
    &lt;/result-document&gt;

 

should be

    &lt;xsl:result-document href=&quot;concat($procid,&#39;.html&#39;)&quot;&gt;
    
    &lt;/xsl:result-document&gt;



</details>



huangapple
  • 本文由 发表于 2023年7月27日 18:41:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/76778939.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定