0

ここでやろうとしているのは、XSL スタイル シートを実行したときに HTML ページを表示することです。.CSS リンクを含む HTML は、XSL 内に埋め込まれています。この場合、.XML ファイルはありません。.XSL スタイル シートの実行時に Bootstrap HTML ページを出力しようとしています。.CSS スタイル シートが機能していないことが予想されるため、HTML は機能しているようです。

ここに.xslがあります

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dp="http://www.datapower.com/extensions" xmlns:dpconfig="http://www.datapower.com/param/config" extension-element-prefixes="dp" exclude-result-prefixes="dp dpconfig">
<xsl:output method="html"/>
<xsl:template match="/">

                            <html lang="en">
                              <head>
                                <meta charset="utf-8"/>
                                <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
                                <meta name="viewport" content="width=device-width, initial-scale=1"/>
                                <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->


                                   <!-- Bootstrap core CSS -->
                                <link href="bootstrap.min.css" rel="stylesheet"/>
                                <!-- Custom styles for this template -->
                                <link href="starter-template.css" rel="stylesheet"/>


                                <meta name="description" content="Error Page"/>
                                <meta name="author" content="AXA Datapower Team"/>
                                <link rel="icon" href="../../favicon.ico"/>

                                <title>Error Page</title>

                                <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
                                <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
                                <script src="../../assets/js/ie-emulation-modes-warning.js"></script>

                                <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
                                <!--[if lt IE 9]>
                                  <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
                                  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
                                <![endif]-->

                              </head>

                              <body>

                               <!-- <nav class="navbar navbar-inverse navbar-fixed-top">
                                  <div class="container">
                                    <div class="navbar-header">
                                      <a class="navbar-brand" href="#">AXA Equitable</a>
                                    </div>
                                  </div>
                                </nav>
                                -->

                                <div class="container">

                                  <div class="starter-template">
                                    <!--<img src="images/warning.png" alt="Error" class="img-rounded">
                                    <img src="images/error-7-xxl.png" alt="Error" class="img-rounded">
                                    <img src="images/exclamation.png" alt="Error" class="img-rounded">-->
                                    <img src="warning-xxl.png" alt="Error" class="img-rounded"/>

                                    <h1>An unexpected error has occurred.</h1>
                                    <p class="lead">Please contact your system administrator for assistance.</p>

                                  </div>

                                </div><!-- /.container -->


                                <!-- Bootstrap core JavaScript
                                ================================================== -->
                                <!-- Placed at the end of the document so the pages load faster -->
                                <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
                                <script src="../../dist/js/bootstrap.min.js"></script>
                                <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
                                <script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
                              </body>
                            </html>
                </xsl:template>

処理されていない .CSS スタイル シートは次のとおりです。

    <!-- Bootstrap core CSS -->
                                <link href="bootstrap.min.css" rel="stylesheet"/>
                                <!-- Custom styles for this template -->
                                <link href="starter-template.css" rel="stylesheet"/>

IBM DataPower で .XSL ページを実行しています。HTML はブラウザーに表示されますが、.CSS スタイルはありません。これは単純に、.CSS が DataPower 上の正しい場所を指していないためですか、それとも問題がより複雑なのでしょうか?

誰かがここで私を助けることができれば、それは素晴らしいことです. これは単純なエラー ページです。空想的なものは何もありません。

4

1 に答える 1

0

インライン スタイル シートを作成しましたが、問題なく動作します。Datapower を使用して .CSS への正しいパスをリンクしていなかったに違いありません。

于 2015-09-29T18:49:30.697 に答える