2015-09-28 111 views
0

我在這裏要做的是在運行XSL樣式表時顯示我的HTML頁面。帶有.CSS鏈接的HTML嵌入在我的XSL中。在這種情況下沒有.XML文件。我試圖在.XSL樣式表執行時輸出Bootstrap HTML頁面。 HTML似乎工作正如我所期望的.CSS樣式表不起作用。在XSL樣式表中顯示帶有.CSS鏈接的Bootstrap 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上的正確位置,還是問題更復雜?

如果任何人都可以在這裏幫助我,這將是偉大的。這是一個簡單的錯誤頁面。沒有什麼花哨。

回答

0

我做了一個內聯樣式表,它工作正常。我一定不會用Datapower將正確的路徑鏈接到.CSS。