首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么我的带有样式表(XSL)的XML文件不能第一次显示?

为什么我的带有样式表(XSL)的XML文件不能第一次显示?
EN

Stack Overflow用户
提问于 2012-11-19 05:03:11
回答 1查看 195关注 0票数 0

带有样式表(XSL)的XML文件可以在以下站点查看:

http://cistrome.org/cisapi/get/d2?id=2693

问题是:在我的浏览器(Firefox16)中,通常需要刷新页面以查看整个页面。否则,我只能看到一个没有任何东西的空白页。

有人对此有想法吗?谢谢!

输入文件

代码语言:javascript
复制
<?xml-stylesheet type="text/xsl" href="/cisapi_static/dataset2.xsl" ?>
<dataset>
    <id>2693</id>
    <treatment>
        <sample id="2112" mode="verbose">
            <factor>GATA2</factor>
            <datasetID>2693</datasetID>
            </cellLine>
            <cellType>Megakaryocytes</cellType>
            <cellPop>CD34+</cellPop>
            <species>Homo sapiens</species>
            <tissue>Bone Marrow</tissue>
            <diseaseState>Normal</diseaseState>
            </condition>
            <paper>Genome-wide analysis of simultaneous GATA1/2, RUNX1, FLI1, and SCL binding in megakaryocytes identifies hematopoietic regulators.</paper>
            <pmid>21571218</pmid>
            <authors>Tijssen MR,Cvejic A,Joshi A,Hannah RL,Ferreira R,Forrai A,Bellissimo DC,Oram SH,Smethurst PA,Wilson NK,Wang X,Ottersbach K,Stemple DL,Green AR,Ouwehand WH,Göttgens B</authors>
            <uniqueID>GSM607950</uniqueID>
            <url>ftp://ftp-trace.ncbi.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX029/SRX029434</url>
        </sample>
    </treatment>
    <control>
        <sample id="2951" mode="verbose">
            <factor>IgG</factor>
            </datasetID>
            </cellLine>
            <cellType>Megakaryocytes</cellType>
            <cellPop>CD34+</cellPop>
            <species>Homo sapiens</species>
            <tissue>Bone Marrow</tissue>
            <diseaseState>Normal</diseaseState>
            </condition>
            <paper>Genome-wide analysis of simultaneous GATA1/2, RUNX1, FLI1, and SCL binding in megakaryocytes identifies hematopoietic regulators.</paper>
            <pmid>21571218</pmid>
            <authors>Tijssen MR,Cvejic A,Joshi A,Hannah RL,Ferreira R,Forrai A,Bellissimo DC,Oram SH,Smethurst PA,Wilson NK,Wang X,Ottersbach K,Stemple DL,Green AR,Ouwehand WH,Göttgens B</authors>
            <uniqueID>GSM607954</uniqueID>
            <url>ftp://ftp-trace.ncbi.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX029/SRX029438</url>
        </sample>
    </control>
</dataset>

样式表

代码语言:javascript
复制
<!-- Edited with XML Spy v2007 (http://www.altova.com) -->
<html xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
    <body style="font-family:Arial,helvetica,sans-serif;font-size:12pt; background-color:#EEEEEE">
        <div style="background-color:#FFFFF;color:black;padding:4px;text-align: center;">
            <b>Dataset </b select="dataset/id">
        </div>
        <xsl:for-each select="dataset/treatment/sample">
            <div style="background-color:#D8E3F9;color:black;padding:4px">
                <span style="font-weight:bold;color:black">         Sample <xsl:value-of select="@id" />: </span>
                <xsl:value-of select="factor" />
            </div>
            <div style="background-color:#FFFFF;color:black;padding:20px">
              Uniqueid: <br select="uniqueID" />
              Factor: <br select="factor" />
              CellLine: <br select="cellLine" />
              Celltype: <br select="cellType" />
              Cellpop: <br select="cellPop" />
              Species: <br select="species" />
              Tissue: <br select="tissue" />
              Diseasestate: <br select="diseaseState" />
              Condition: </div select="condition">
            <div style="background-color:#FFFFF;color:black;padding:20px">
              Paper: <br select="paper" />
              Pmid: <br select="pmid" />
              Authors: <br select="authors" />
              Url: </div select="url">
            <br />
        </xsl:for-each>
        <xsl:for-each select="dataset/control/sample">
            <div style="background-color:#86ABA5;color:black;padding:4px">
                <span style="font-weight:bold;color:black">     Sample <xsl:value-of select="@id" />: </span>
                <xsl:value-of select="factor" />
            </div>
            <div style="background-color:#FFFFF;color:black;padding:20px">
              Uniqueid: <br select="uniqueID" />
              Factor: <br select="factor" />
              CellLine: <br select="cellLine" />
              Celltype: <br select="cellType" />
              Cellpop: <br select="cellPop" />
              Species: <br select="species" />
              Tissue: <br select="tissue" />
              Diseasestate: <br select="diseaseState" />
              Condition: </div select="condition">
            <div style="background-color:#FFFFF;color:black;padding:20px">
              Paper: <br select="paper" />
              Pmid: <br select="pmid" />
              Authors: <br select="authors" />
              Url: </div select="url">
            <br />
        </xsl:for-each>
    </body>
</html>
EN

回答 1

Stack Overflow用户

发布于 2012-11-19 05:40:20

鉴于OP的评论,请尝试: tags to turn off caching in all browsers?

代码语言:javascript
复制
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />

把这些插入头部。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13447948

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档