Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何在XSLT中包含CSS文件_Javascript_Html_Css_Xml_Xslt - Fatal编程技术网

Javascript 如何在XSLT中包含CSS文件

Javascript 如何在XSLT中包含CSS文件,javascript,html,css,xml,xslt,Javascript,Html,Css,Xml,Xslt,所以我有一个CSS文件,如下所示 .table_class1DeffCell { border-top-width : 1; border-left-width : 1; border-right-width : 1; border-bottom-width : 1; } .table_class11DeffCell { border-bottom-color : 000000; border-top-color : 000000; border-right-color : 000000; bo

所以我有一个CSS文件,如下所示

.table_class1DeffCell
{
border-top-width : 1;
border-left-width : 1;
border-right-width : 1;
border-bottom-width : 1;
}
.table_class11DeffCell
{
border-bottom-color : 000000;
border-top-color : 000000;
border-right-color : 000000;
border-left-color : 000000;
border-top-style : solid;
border-left-style : solid;
border-right-style : solid;
border-bottom-style : solid;
border-top-width : 1;
border-left-width : 1;
border-right-width : 1;
border-bottom-width : 1;
}
.table_class24DeffCell
{
border-bottom-color : 000000;
border-top-color : 000000;
border-right-color : 000000;
border-left-color : 000000;
border-top-style : solid;
border-left-style : solid;
border-right-style : solid;
border-bottom-style : solid;
border-top-width : 1;
border-left-width : 1;
border-right-width : 1;
border-bottom-width : 1;
}

.text_class40
{
font-style : italic;
}

.text_class41
{
font-weight : bold;
}

.image_class42
{
}
<link rel="stylesheet" type="text/css" href="FormatingProblem.css"></link>
在HTML中,它的链接如下所示

.table_class1DeffCell
{
border-top-width : 1;
border-left-width : 1;
border-right-width : 1;
border-bottom-width : 1;
}
.table_class11DeffCell
{
border-bottom-color : 000000;
border-top-color : 000000;
border-right-color : 000000;
border-left-color : 000000;
border-top-style : solid;
border-left-style : solid;
border-right-style : solid;
border-bottom-style : solid;
border-top-width : 1;
border-left-width : 1;
border-right-width : 1;
border-bottom-width : 1;
}
.table_class24DeffCell
{
border-bottom-color : 000000;
border-top-color : 000000;
border-right-color : 000000;
border-left-color : 000000;
border-top-style : solid;
border-left-style : solid;
border-right-style : solid;
border-bottom-style : solid;
border-top-width : 1;
border-left-width : 1;
border-right-width : 1;
border-bottom-width : 1;
}

.text_class40
{
font-style : italic;
}

.text_class41
{
font-weight : bold;
}

.image_class42
{
}
<link rel="stylesheet" type="text/css" href="FormatingProblem.css"></link>

在HTML中,粗体和斜体可以正确工作,因为链接了CSS文件

实际上,我正在将HTML文件转换为Word文档,以防我不能使用粗体和斜体

这是我的XSLT文件

 <table width="100%">
            <tr>
              <xsl:if test="@class=$TableClass">
                <!--left Table Cell-->
                <xsl:choose>
                  <!--Requirement-->
                  <xsl:when test="td[@class=$RequirementType]/span/span/. = 'Non Functional' or td[@class=$RequirementType]/span/span/. = 'Functional' or td[@class=$RequirementType]/span/span/. = 'Scenario' or td[@class=$RequirementType]/span/span/. = 'Actor'">
                    <td style="border-Top: black 1.0pt solid; border-Bottom: #4896a black 1.0pt solid; vertical-align:'top'" bgcolor = "#DDD9C3" width="80%">
                      <!--Text-->
                      <xsl:if test="td/@class=$Requirements">
                        <xsl:for-each select="td[@class=$Requirements]/span/span | td[@class=$Requirements]/span/br | td[@class=$Requirements]/span/blockquote">
                          <span>
                            <xsl:if test="name() != 'br'">
                              <xsl:value-of select="." />
                              <xsl:if test="name() = 'blockquote'">
                                <br/>
                              </xsl:if>
                            </xsl:if>
                            <xsl:if test="name() = 'br'">
                              <br/>
                            </xsl:if>

                          </span>
                        </xsl:for-each>
                      </xsl:if>
                      <br />
                      <br />
                      <!--Reference-->
                      <xsl:if test="td/@class=$References">
                        <xsl:if test="string-length(td[@class=$References]/span/span)!=0">
                          <span>
                            <br />
                            <xsl:for-each select="td[@class=$References]/span/span | td[@class=$References]/span/br">
                              <span>
                                <xsl:if test="name() != 'br'">
                                  <xsl:value-of select="." />
                                </xsl:if>
                                <xsl:if test="name() = 'br'">
                                  <br/>
                                </xsl:if>
                              </span>
                            </xsl:for-each>
                          </span>
                        </xsl:if>
                      </xsl:if>
                      <br />
                      <br />
                    </td>
                  </xsl:when>
                </xsl:choose>
                <!--right Table Cell-->
                <xsl:choose>
                  <!--Requirement-->
                  <xsl:when test="td[@class=$RequirementType]/span/span/. = 'Functional' or td[@class=$RequirementType]/span/span/. = 'Non Functional' or td[@class=$RequirementType]/span/span/. = 'Scenario' or td[@class=$RequirementType]/span/span/. = 'Actor'">
                    <xsl:choose>
                      <!--Search 1-->
                      <xsl:when test="td[@class=$Auxiliary]/span[contains(span, $search1)]">
                        <td style="vertical-align:'top'" bgcolor="{$search1Color}" width="20%">
                          <span style="font-size:8pt">
                            <!--UID_ATR-->
                            <xsl:if test="td/@class=$UID">
                              ID:
                              <xsl:value-of select="td[@class=$UID]/." />
                            </xsl:if>
                            <br />
                            <!--TFS_ID-->
                            <xsl:if test="td/@class=$TFS_ID">
                              TFS:
                              <xsl:value-of select="td[@class=$TFS_ID]/." />
                            </xsl:if>
                            <br />
                            <!--TFS_Triage-->
                            <xsl:if test="td/@class=$Triage">
                              <xsl:value-of select="td[@class=$Triage]/." />
                            </xsl:if>
                            <br />
                            <!--V. In-->
                            <xsl:if test="td/@class=$V.In">
                              <xsl:value-of select="td[@class=$V.In]/." />
                            </xsl:if>
                            <br />
                            <!--TFS_Priority-->
                            <xsl:if test="td/@class=$Priority">
                              (Prio
                              <xsl:value-of select="td[@class=$Priority]/." />)
                            </xsl:if>
                            <br />
                            <!--TFS_Requirement Type-->
                            <xsl:if test="td/@class=$RequirementType">
                              <xsl:value-of select="td[@class=$RequirementType]/." />
                            </xsl:if>
                            <br />
                            <br />
                            <!--Auxiliary-->
                            <xsl:if test="td/@class=$Auxiliary">
                              <xsl:value-of select="td[@class=$Auxiliary]/." />
                              <br />
                            </xsl:if>
                            <br />
                          </span>
                        </td>
                      </xsl:when>
                      <!--Search 2-->
                      <xsl:when test="td[@class=$Auxiliary]/span[contains(span, $search2)]">
                        <td style="vertical-align:'top'" bgcolor="{$search2Color}" width="20%">
                          <span style="font-size:8pt">
                            <!--UID_ATR-->
                            <xsl:if test="td/@class=$UID">
                              ID:
                              <xsl:value-of select="td[@class=$UID]/." />
                            </xsl:if>
                            <br />
                            <!--TFS_ID-->
                            <xsl:if test="td/@class=$TFS_ID">
                              TFS:
                              <xsl:value-of select="td[@class=$TFS_ID]/." />
                            </xsl:if>
                            <br />
                            <!--TFS_Triage-->
                            <xsl:if test="td/@class=$Triage">
                              <xsl:value-of select="td[@class=$Triage]/." />
                            </xsl:if>
                            <br />
                            <!--V. In-->
                            <xsl:if test="td/@class=$V.In">
                              <xsl:value-of select="td[@class=$V.In]/." />
                            </xsl:if>
                            <br />
                            <!--TFS_Priority-->
                            <xsl:if test="td/@class=$Priority">
                              (Prio
                              <xsl:value-of select="td[@class=$Priority]/." />)
                            </xsl:if>
                            <br />
                            <!--TFS_Requirement Type-->
                            <xsl:if test="td/@class=$RequirementType">
                              <!--Zeilenumbruch-->
                              <xsl:value-of select="td[@class=$RequirementType]/." />
                            </xsl:if>
                            <br />
                            <br />
                            <!--Auxiliary-->
                            <xsl:if test="td/@class=$Auxiliary">
                              <xsl:value-of select="td[@class=$Auxiliary]/." />
                              <br />
                              <!--Zeilenumbruch-->
                            </xsl:if>
                            <br />
                          </span>
                        </td>
                      </xsl:when>
                      <!--No Search-->
                      <xsl:otherwise>
                        <td style="vertical-align:'top'" width="20%">
                          <span style="font-size:8pt">
                            <!--UID_ATR-->
                            <xsl:if test="td/@class=$UID">
                              ID:
                              <xsl:value-of select="td[@class=$UID]/." />
                            </xsl:if>
                            <br />
                            <!--TFS_ID-->
                            <xsl:if test="td/@class=$TFS_ID">
                              TFS:
                              <xsl:value-of select="td[@class=$TFS_ID]/." />
                            </xsl:if>
                            <br />
                            <!--TFS_Triage-->
                            <xsl:if test="td/@class=$Triage">
                              <xsl:value-of select="td[@class=$Triage]/." />
                            </xsl:if>
                            <br />
                            <!--V. In-->
                            <xsl:if test="td/@class=$V.In">
                              <xsl:value-of select="td[@class=$V.In]/." />
                            </xsl:if>
                            <br />
                            <!--TFS_Priority-->
                            <xsl:if test="td/@class=$Priority">
                              (Prio
                              <xsl:value-of select="td[@class=$Priority]/." />)
                            </xsl:if>
                            <br />
                            <!--TFS_Requirement Type-->
                            <xsl:if test="td/@class=$RequirementType">
                              <xsl:value-of select="td[@class=$RequirementType]/." />
                            </xsl:if>
                            <br />
                            <br />
                            <!--Auxiliary-->
                            <xsl:if test="td/@class=$Auxiliary">
                              <xsl:value-of select="td[@class=$Auxiliary]/." />
                              <br />
                              <!--Zeilenumbruch-->
                            </xsl:if>
                            <br />
                          </span>
                        </td>
                      </xsl:otherwise>
                    </xsl:choose>
                  </xsl:when>
                  <!--No Requirement-->
                  <xsl:otherwise>
                    <span width="20%"></span>
                  </xsl:otherwise>
                </xsl:choose>
              </xsl:if>
            </tr>
          </table>









身份证件:
TFS:


(普里奥) )




身份证件:
TFS:


(普里奥) )




身份证件:
TFS:


(普里奥) )