我正在本地机器上以调试模式使用Flask&;谷歌浏览器检查我的路线
我想使用这个xml stylesheet呈现一个XML响应。响应(包括xml样式表标记)如下所示(在Google Chrome中检查源代码):
<?xml version="1.0" ?><?xml-stylesheet type="text/xsl" href="127.0.0.1:8887/oaitohtml.xsl"?><OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
<responseDate>2020-06-27T17:54:43Z</responseDate>
<request verb="Identify">base_url</request>
<Identify>
<repositoryName>the_project</repositoryName>
<baseURL>base_url</baseURL>
<protocolVersion>2.0</protocolVersion>
<adminEmail>contact@something.com</adminEmail>
<earliestDatestamp>2011-01-01T00:00:00Z</earliestDatestamp>
<deletedRecord>persistent</deletedRecord>
<granularity>YYYY-MM-DDThh:mm:ssZ</granularity>
<compression>gzip</compression>
<compression>deflate</compression>
</Identify>
</OAI-PMH>
然而,在我的例子中,当查看Google Chrome(localhost:5000/oai)中的路由时,我只得到原始文本输出:
2020-06-27T18:01:41Z base_url the_project base_url 2.0 contact@something.com 2011-01-01T00:00:00Z persistent YYYY-MM-DDThh:mm:ssZ gzip deflate
我了解到,由于安全原因,google不允许从文件中读取文件(例如,将其放在我的静态文件夹中),因此我尝试通过Web Server for Chrome插件提供文件。当我转到127.0.0.1:8887/oaitohtml.xsl时,我确实可以看到样式表
我错过了什么使这项工作
干杯
目前没有回答
相关问题 更多 >
编程相关推荐