Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

How to fix occurred error in search page? #17

Open
IoannaKy opened this issue Jun 11, 2015 · 3 comments
Open

How to fix occurred error in search page? #17

IoannaKy opened this issue Jun 11, 2015 · 3 comments

Comments

@IoannaKy
Copy link

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
Copy link
Contributor

ajenhl commented Jun 11, 2015

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
Copy link
Member

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
Copy link
Contributor

ajenhl commented May 8, 2017

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants