patilvaibhavrao Ответов: 0

Ошибка при преобразовании XSLT: произошла неизвестная ошибка ()


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform">


<xsl:template match="/">

  <html>
    <head>
      <style type="text/css">
        body
        {
            font-family:"Arial";
        }
        th
        {
            font-weight:"normal";
        }
       </style>
    </head>
  <body>

    <xsl:for-each select="ReportData/BodyType">

    <div style="height:50px;background:#FFFFFF;text-align:center">
    </div> <!-- getting space between two tables -->

    <xsl:variable name="BkColour" select="BkColourCode"/>
    <xsl:variable name="BrdColour" select="BorderColourCode"/>

    <table width="80%" border="2" bordercolor="{$BrdColour}" cellpadding="10" cellspacing="0" valign="center" align="center">
        <tr bgcolor="{$BkColour}">
        <th><CENTER><b><font size="50"  color="white"><b><xsl:value-of select="BodyTypeName"/></b></font></b></CENTER></th>
        </tr>
       </table>

    <xsl:if test = " position() != last()"> <!-- to avoid to print sureIQ and sureExpo data while generatiing report for trauma  -->

    <div style="height:50px;background:#FFFFFF;text-align:center">
    </div> <!-- getting space between two tables -->

    <table width="80%" height="5px" border="2" bordercolor="{$BrdColour}" cellpadding="10" cellspacing="0" valign="center" align="center">
        <tr bgcolor="{$BkColour}">
        <td><CENTER><b><font size="4" color="white"><xsl:value-of select="BodyTypeName"/><xsl:copy-of select="DefSureExpParam/DefSureExpReportHeading"/></font></b></CENTER></td>
        </tr>
       </table>

<!-- for loop for the sure exposure is started from here -->

    <xsl:for-each select="DefSureExpParam/DefSureExpParams">

    <div style="height:50px;background:#FFFFFF;text-align:center">
    </div> <!-- getting space between two tables -->

    <xsl:variable name="rowspan" select="RowSpan"/>
    <xsl:variable name="columnspan" select="Columnspan"/>

    <table width="80%" border = "1" bordercolor="#4F81BD" cellpadding="0" cellspacing="0" valign="center" align="center">
      <tr>
    <th ROWSPAN = "{$rowspan}" border="3" bgcolor="#4f81bd" bordercolor = " #4F81BD" style = "width = 5px"></th>
    <th COLSPAN = "{$columnspan}" align = "left" bgcolor="#DCE6F2"><font style = " font-weight = normal"><xsl:value-of select="DefSureExpOrganName"/></font></th>
    </tr>
       <tr>
        <th><right><b>Name</b></right></th>
        <th><right><b>SD</b></right></th>
        <th><right><b>X-Y Modulation</b></right></th>
        <th><right><b>Slice Thickness</b></right></th>
        <th><right><b><SureIQ><sup><font style = "font-weight = normal">SURE</font></sup>IQ</SureIQ></b></right></th>
        <th><right><b>Max mA</b></right></th>
        <th><right><b>Min mA</b></right></th>

       </tr>
    <xsl:for-each select = "DefParams">
      <tr>
        <td><CENTER><xsl:value-of select="DefSureExpName"/></CENTER></td>
        <td><CENTER><xsl:value-of select="DefSureExpSD"/></CENTER></td>
        <td><CENTER><xsl:value-of select="DefSureExpXYModulation"/></CENTER></td>
        <td><CENTER><xsl:value-of select="DefSureExpSliceThickness"/></CENTER></td>
        <td><CENTER><xsl:value-of select="DefSureExpSureIQ"/></CENTER></td>
        <td><CENTER><xsl:value-of select="DefSureExpMaxmA"/></CENTER></td>
        <td><CENTER><xsl:value-of select="DefSureExpMinmA"/></CENTER></td>
      </tr>
      </xsl:for-each>
    </table>

    </xsl:for-each>


<!-- for loop for the sure exposure is ended here -->

    <div style="height:50px;background:#FFFFFF;text-align:center">
    </div> <!-- getting space between two tables -->

<!-- for loop for the sure-iq is started from here  -->


    <table width="80%" border="2" bordercolor = "{$BrdColour}" cellpadding="10" cellspacing="0" valign="center" align="center">
        <tr bgcolor="{$BkColour}">
        <td><CENTER><b><font size="4" color="white"><xsl:value-of select="BodyTypeName"/><xsl:copy-of select="DefSureIQParam/DefSureIQParamHeading"/></font></b></CENTER></td>
        </tr>
       </table>


    <div style="height:50px;background:#FFFFFF;text-align:center">
    </div> <!-- getting space between two tables -->

   <xsl:variable name="temp" select="DefSureIQParam/TotalRowSpan"/>
        <td  ROWSPAN = "{$temp}" ><CENTER><xsl:value-of select="AnatomyName"/></CENTER></td>
  <table  width = "80%" border = "1" bordercolor="#4F81BD" cellpadding="0" cellspacing="0" valign="center" align="center">
      <tr bgcolor="#DCE6F2">

    <th ROWSPAN = "{$temp}" bgcolor = "#4f81bd" bordercolor = " #4f81bd" style = "width = 5px"></th>
    <th><CENTER>Anatomy</CENTER></th>
    <th><CENTER>Selection</CENTER></th>
    <th><CENTER>FC</CENTER></th>
    <th><CENTER>AIDR</CENTER></th>
    <th><CENTER>Filter</CENTER></th>
    <th><CENTER>Boost3D</CENTER></th>
    <th><CENTER>OSR</CENTER></th>
    </tr>
    <xsl:for-each select="DefSureIQParam/DefParams">
      <tr>

    <xsl:variable name="count" select="RowSpan"/>
    <xsl:if test = "RowSpan  &gt; 1">
       <td  ROWSPAN = "{$count}" ><CENTER><b><xsl:value-of select="AnatomyName"/></b></CENTER></td>
    </xsl:if>
      <td><CENTER><xsl:value-of select="Selection"/></CENTER></td>
        <td><CENTER><xsl:value-of select="SureIQFC"/></CENTER></td>
        <td><CENTER><xsl:value-of select="SureIQAIDR"/></CENTER></td>
        <td><CENTER><xsl:value-of select="SureIQFilter"/></CENTER></td>
        <td><CENTER><xsl:value-of select="SureIQBoost3D "/></CENTER></td>
        <td><CENTER><xsl:value-of select="SureIQOSR"/></CENTER></td>
      </tr>
      </xsl:for-each>
   </table>
<!-- for loop for the sure-iq is started from here  -->

</xsl:if> <!--  if statement ended here   -->

<!-- for loops for exam plan started from here -->

    <xsl:for-each select = "OrganType">

    <div style="height:50px;background:#FFFFFF;text-align:center">
    </div> <!-- getting space between two tables -->

    <table width="80%"  border="2" bordercolor="{$BrdColour}" cellpadding="10" cellspacing="0" valign="center" align="center">
      <tr bgcolor="{$BkColour}">
    <td><CENTER><font size="40" color="white"><b><xsl:value-of select="OrganName"/></b></font></CENTER></td>
    </tr>
       </table>

    <xsl:for-each select = "ExamPlan">

    <div style="height:50px;background:#FFFFFF;text-align:center">
    </div> <!-- getting space between two tables -->

    <table width="80%" border="2" bordercolor="{$BrdColour}" cellpadding="10" cellspacing="0" valign="center" align="center">
      <tr bgcolor="{$BkColour}">
    <td><CENTER><font size="4" color="white"><xsl:value-of select="ExamPlanName"/></font></CENTER></td>
    </tr>
       </table>

    <xsl:for-each select="Scanogram">

    <div style="height:50px;background:#FFFFFF;text-align:center">
    </div>

    <table width="80%" border = "1" bordercolor="#4F81BD" cellpadding="0" cellspacing="0" valign="center" align="center">
      <tr>
    <xsl:variable name="rowcnt" select = "RowspanCnt"/>
    <xsl:variable name="columncnt" select = "ColoumnspanCnt"/>

    <th ROWSPAN = "{$rowcnt}" border="1" bgcolor="#4f81bd" bordercolor = " #4f81bd" style = "width = 5px"></th>
    <th COLSPAN = "{$columncnt}" align = "left"  bgcolor="#DCE6F2"><xsl:copy-of select="ScanogramHeading"/></th>
    </tr>
       <tr>
        <th><right>Scan Mode</right></th>
        <th><right>Start Time S</right></th>
        <th><right>Wait Time S</right></th>
        <th ><right>kV</right></th>
        <th><right>mA</right></th>
        <th><right>Range mm</right></th>
        <th><right>Direction</right></th>
        <th ><right>Display Filter</right></th>
        <th><right>Scano Angle <sup> 0 </sup></right></th>
        <th><right>CE</right></th>
       </tr>


    <xsl:for-each select="ScanogramParams">
      <tr>
        <td><CENTER><xsl:value-of select="ScanoModeName"/></CENTER></td>
        <td><CENTER><xsl:value-of select="ScanoStartTime"/></CENTER></td>
        <td><CENTER><xsl:value-of select="ScanoWaitTime"/></CENTER></td>
        <td><CENTER><xsl:value-of select="ScanokV"/></CENTER></td>
        <td><CENTER><xsl:value-of select="ScanomA"/></CENTER></td>
      <td><CENTER><xsl:value-of select="ScanoRange"/></CENTER></td>
        <td><CENTER><xsl:value-of select="ScanoDirection"/></CENTER></td>
        <td><CENTER><xsl:value-of select="ScanoDisplayFilter"/></CENTER></td>
        <td><CENTER><xsl:value-of select="ScanoAngle"/></CENTER></td>
        <td><CENTER><xsl:value-of select="ScanoCE"/></CENTER></td>
    </tr>
    </xsl:for-each>
    </table>
    </xsl:for-each>

    <xsl:for-each select="ScanMode"> <!-- FOR SAN MODE MORE THAN ONE -->

    <div style="height:50px;background:#FFFFFF;text-align:center">
    </div> <!-- getting space between two tables -->

    <table width = "80%" border = "1" bordercolor="#4F81BD" cellpadding="0" cellspacing="0" valign="center" align="center">
    <tr bgcolor="#DCE6F2">

    <xsl:variable name="rowcnt" select = "RowspanCnt"/>
    <xsl:variable name="columncnt" select = "ColoumnspanCnt"/>

    <th ROWSPAN = "{$rowcnt}" bgcolor = "#4f81bd" bordercolor="#385d8a" style = "width = 5px"></th>
      <th COLSPAN = "{$columncnt}" align = "left"><xsl:value-of select="ScanModeHeading"/></th>
    </tr>

    <tr>
    <th><CENTER>Scan Mode</CENTER></th>
    <th><CENTER>Start Time s</CENTER></th>
    <th><CENTER>Wait Time s</CENTER></th>
    <th><CENTER>Collimation</CENTER></th>
    <th><CENTER>Pitch</CENTER></th>
    <th><CENTER>kV</CENTER></th>
    <th><CENTER>mA</CENTER></th>
    <th><CENTER>Rotation time s</CENTER></th>
    <th><CENTER>Range mm</CENTER></th>
    <th><CENTER>Direction</CENTER></th>
    <th><CENTER>CFOV</CENTER></th>
    <th><CENTER>CE</CENTER></th>
    <th><CENTER>CTDI mGy </CENTER></th>
    <th><CENTER>DLP mGy.cm</CENTER></th>


    </tr>
    <xsl:for-each select="ScanModeParam">
      <tr>
        <td><CENTER><xsl:value-of select="ScanModeName"/></CENTER></td>
        <td><CENTER><xsl:value-of select="StartTime"/></CENTER></td>
        <td><CENTER><xsl:value-of select="WaitTime"/></CENTER></td>
        <td><CENTER><xsl:value-of select="Collimation"/></CENTER></td>
        <td><CENTER><xsl:value-of select="Pitch"/></CENTER></td>
        <td><CENTER><xsl:value-of select="kV"/></CENTER></td>
        <td><CENTER><xsl:value-of select="mA"/></CENTER></td>
      <td><CENTER><xsl:value-of select="RotationTime"/></CENTER></td>
        <td><CENTER><xsl:value-of select="Range"/></CENTER></td>
      <td><CENTER><xsl:value-of select="Direction"/></CENTER></td>
        <td><CENTER><xsl:value-of select="CFOV"/></CENTER></td>
      <td><CENTER><xsl:value-of select="CE"/></CENTER></td>
      <td><CENTER><xsl:value-of select="CTDI"/></CENTER></td>
        <td><CENTER><xsl:value-of select="DLP"/></CENTER></td>
    </tr>
    </xsl:for-each>

    <tr>
    <td height = "10px" COLSPAN = "{$columncnt}" bgcolor = "#FFFFFF" bordercolor="#FFFFFF" style = "width = 5px"></td>
    </tr>

    <tr>
    <th COLSPAN = "2" ><CENTER>Reconstruction</CENTER></th>
    <th COLSPAN = "2" ><CENTER>Slice thickness</CENTER></th>
    <th COLSPAN = "2" ><CENTER>Slice Interval</CENTER></th>
    <th COLSPAN = "2" ><CENTER><sup>SURE</sup>IQ</CENTER></th>
    <th COLSPAN = "2" ><CENTER>AIDR</CENTER></th>
    <th><CENTER>FC</CENTER></th>
    <th><CENTER>Boost 3D</CENTER></th>
    <th><CENTER>OSR</CENTER></th>
    <th><CENTER>Filter</CENTER></th>
    </tr>

    <xsl:for-each select="ReconModes">
      <tr>
        <td COLSPAN = "2" ><CENTER><xsl:value-of select="Reconstruction"/></CENTER></td>
        <td COLSPAN = "2" ><CENTER><xsl:value-of select="SliceThickness"/></CENTER></td>
        <td COLSPAN = "2" ><CENTER><xsl:value-of select="SliceInterval"/></CENTER></td>
        <td COLSPAN = "2" ><CENTER><xsl:value-of select="SureIQRecon"/></CENTER></td>
      <td COLSPAN = "2" ><CENTER><xsl:value-of select="AIDR"/></CENTER></td>
        <td><CENTER><xsl:value-of select="FC"/></CENTER></td>
        <td><CENTER><xsl:value-of select="Boost3D"/></CENTER></td>
        <td><CENTER><xsl:value-of select="OSR"/></CENTER></td>
        <td><CENTER><xsl:value-of select="Filter"/></CENTER></td>
      </tr>
    </xsl:for-each>
    </table>
</xsl:for-each>

    <xsl:for-each select="SureExpMode">

    <div style="height:100px;background:#FFFFFF;text-align:center">
    </div>

    <table width="80%" border = "1" bordercolor="#c0504d" cellpadding="0" cellspacing="0" valign="center" align="center">
      <tr>
    <xsl:variable name="columncnt" select = "ColoumnspanCnt"/>
    <th COLSPAN = "{$columncnt}" align = "left" border="1" bgcolor="#fdeada" bordercolor = "#c0504d" ><xsl:copy-of select="SureExpHeading"/></th>
    </tr>
       <tr>
        <th><right>Target SD</right></th>
        <th><right>Target Slice Thickness</right></th>
        <th><right>Target <sup> SURE </sup> IQ</right></th>
        <th ><right>AIDR</right></th>
        <th><right>FC</right></th>
        <th><right>XY Modulation</right></th>
        <th><right>Max mA</right></th>
        <th ><right>Min mA</right></th>
       </tr>


    <xsl:for-each select="SureParam">
      <tr>
        <td><CENTER><xsl:value-of select="SXTargetSD"/></CENTER></td>
        <td><CENTER><xsl:value-of select="SXTargetSliceThickness"/></CENTER></td>
        <td><CENTER><xsl:value-of select="SXTargetSureIQ"/></CENTER></td>
        <td><CENTER><xsl:value-of select="SXAIDR"/></CENTER></td>
        <td><CENTER><xsl:value-of select="SXFC"/></CENTER></td>
      <td><CENTER><xsl:value-of select="SXXYModulation"/></CENTER></td>
        <td><CENTER><xsl:value-of select="SXMaxMA"/></CENTER></td>
        <td><CENTER><xsl:value-of select="SXMinMA"/></CENTER></td>
    </tr>
    </xsl:for-each>
    </table>
</xsl:for-each>
</xsl:for-each>
</xsl:for-each>
<!-- for loops for exam plan ended here -->
      </xsl:for-each>
     </body>
  </html>
</xsl:template>
</xsl:stylesheet>



выше код-это мой код xslt, но я получаю ошибку в firefox Error во время преобразования XSLT: произошла неизвестная ошибка (), но тот же xslt работает очень хорошо в IE, пожалуйста, помогите мне
кроме того если я открою свой xml с помощью этого xslt в google crome он не покажет результат но если вы просматриваете источник мы можем увидеть источник как xml файл в чем проблема

0 Ответов