[英]XML on eXist-db : err:XPST0003 unexpected token
I have an XML document on eXist-db but the compiler is complaining giving me the following error: 我在eXist-db上有一个XML文档,但是编译器抱怨给我以下错误:
Cannot compile xquery: exerr:ERROR org.exist.xquery.XPathException: err:XPST0003 unexpected token: xml-stylesheet href="../xsltforms/xsltforms.xsl" type="text/xsl" [at line 2, column 1]
无法编译xquery:exerr:ERROR org.exist.xquery.XPathException:err:XPST0003意外令牌:xml-stylesheet href =“ ../ xsltforms / xsltforms.xsl” type =“ text / xsl” [在第2行,第1列]
I have tried everything I could think of: 我已经尝试了所有我能想到的:
This is the relevant part of the XML I think: 我认为这是XML的相关部分:
nuevacontribucion.xml nuevacontribucion.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="../xsltforms/xsltforms.xsl" type="text/xsl" ?><?css-conversion no?><?xsltforms-options debug="no"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xf="http://www.w3.org/2002/xforms">
<head>
<title>Crear una nueva Contribución</title>
<link href="../css/loading.css" rel="stylesheet"/>
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen"/>
<link href="bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" media="screen"/>
<link href="assets/styles.css" rel="stylesheet" media="screen"/>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="vendors/flot/excanvas.min.js"></script><![endif]-->
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script src="vendors/modernizr-2.6.2-respond-1.1.0.min.js"/>
<style>
input[type='text'], select{
min-height: 30px;
}
iframe{
width: 100% !important;
height: 200px !important;
}
.datepicker .aid-button{
display: none !important;
}
</style>
If I remove the xml-stylesheet tag then it throws the same exception but complaining about css-conversion, if I remove it then it's about the following tag, if I remove it then it's about xmlns not being defined or something. 如果我删除xml-stylesheet标记,那么它将引发相同的异常,但会抱怨css-conversion,如果我将其删除,则是关于以下标记,如果我将其删除,则是关于未定义xmlns或其他内容。
Change the XSLT engine from Saxon to Xalan. 将XSLT引擎从Saxon更改为Xalan。
By default, eXist-db 2.0 comes with the following configuration in conf.xml
in the eXist-db install directory: 默认情况下,eXist-db 2.0在eXist-db安装目录的
conf.xml
中具有以下配置:
<transformer class="net.sf.saxon.TransformerFactoryImpl">
To solve your problem, change it to: 要解决您的问题,请将其更改为:
<transformer class="org.apache.xalan.processor.TransformerFactoryImpl">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.