ICode9

精准搜索请尝试: 精确搜索
首页 > 编程语言> 文章详细

php xmlParsePITarget:无效的名称前缀“ xml”错误

2019-11-22 02:31:17  阅读:296  来源: 互联网

标签:xslt php


可以帮助我理解(并解决此错误).该错误显示为:

警告:simplexml_load_file():/home/jeffreycwitt/webapps/lombardpress_instances/petrusplaoul/lombardpress/phpfunctions/../../projectfiles/GitTextfiles/lectio1/lectio1.xml:2:解析器警告:xmlParsePITarget:无效的名称前缀“ xml”在第47行的home / jeffreycwitt / webapps / lombardpress_instances / petrusplaoul / lombardpress / phpfunctions / generalfunctions.php中

该错误似乎与xml文件开头的架构替代有关.

文件开头的声明如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://bitbucket.org/lombardpress/lombardpress-schema/raw/master/LombardPressODD.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://bitbucket.org/lombardpress/lombardpress-schema/raw/master/LombardPressODD.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
    <teiHeader>

我不明白为什么收到警告.
在可以打开“ display_errors”的系统上,这不是问题.但是现在我正在使用无法访问php.ini文件的系统.

理想情况下,我想解决该问题,以便没有任何警告.
但是,由于其他原因,我需要适当的模式声明.

建议.
w

解决方法:

有一个问题:

><?xml前缀保留给第一行
使用下划线作为简单解决方案:

<?_xml-model href="https://bitbucket.org/lombardpress/lombardpress-schema/raw/master/LombardPressODD.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?_xml-model href="https://bitbucket.org/lombardpress/lombardpress-schema/raw/master/LombardPressODD.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>

参考文献

> Namespaces in XML 1.0: Reserved Prefixes and Namespace Names

标签:xslt,php
来源: https://codeday.me/bug/20191122/2056245.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有