XProc and XQuery

Issues related to W3C XQuery.
Posts: 7

XProc and XQuery

Tue Aug 23, 2016 8:13 pm

I try to run xquery from xproc.
But with the files below I get the error "Content is not allowed in prolog" in the file hello.xquery.
It seems like a wrong saxon version is used (which can't handle xquery)
What to do?

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<test>Hello, World!</test>

Code: Select all


Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:c="http://www.w3.org/ns/xproc-step"
    <p:input port="source">
        <p:document href="hello.xml"/>
    <p:output port="result" sequence="true"/>
        <p:input port="query">
            <p:document href="hello.xquery"/>
        <p:input port="parameters">
Posts: 2471

Re: XProc and XQuery

Wed Aug 24, 2016 5:17 pm


You cannot use p:document/@href to point to an XQuery script, p:document only works with XML files, hence the "Content is not allowed in prolog." XML parser error.
You should use p:data/@href instead:

Code: Select all

<p:input port="query">
    <p:data href="hello.xquery"/>

Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger

Return to “XQuery”

Who is online

Users browsing this forum: No registered users and 0 guests