kcl-ddh / kiln

Kiln is a multi-platform framework for building and deploying complex websites whose source content is primarily in XML. It brings together various independent software components into an integrated whole that provides the infrastructure and base functionality for such sites.
Apache License 2.0
34 stars 62 forks source link

How to fix occurred error in search page? #17

Open IoannaKy opened 9 years ago

IoannaKy commented 9 years ago

I would like to ask how to fix this error that I receive when clicking the search page. It says: net.sf.saxon.trans.XPathException: When 'standalone' or 'doctype-system' is specified, the document must be well-formed; but this document contains a top-level text node

When validating the results-to-html.xsl file, I get these two errors. System ID: /webapps/ROOT/stylesheets/solr/results-to-html.xsl Engine name: Saxon-PE 9.6.0.5 Severity: error Description: javax.xml.transform.TransformerException: Malformed URL cocoon://_internal/url/reverse.xsl(base file://webapps/ROOT/stylesheets/solr/results-to-html.xsl)

Description: javax.xml.transform.TransformerException: Malformed URL cocoon://_internal/url/reverse.xsl(base file:/webapps/ROOT/stylesheets/solr/results-to-html.xsl): unknown protocol: cocoon

Is the error connected with this invalid xsl file? I would appreciate any help. Thank you in advance!

ajenhl commented 9 years ago

The results-to-html.xsl file is fine. The cocoon protocol is understood and interpreted correctly by Cocoon (as can be seen with an unchanged Kiln installation, where the search runs without error). Some change you have made is introducing text content instead of or before the first XML element. Look through which changes you have made to either results-to-html.xsl or assets/templates/search.xml - that is likely where the problem lies.

jmiguelv commented 9 years ago

The issue was in the XSLT result-to-html.xsl, but the error message is very misleading. The problem was that a <xsl:number /> was being applied to an empty string.

ajenhl commented 7 years ago

Is there anything that can be done about the misleading error message, or should this be closed?