If I read your code correctly, you try to write to 


which seems to be a folder. Have you tried adding a file name?

- Michael Müller-Hillebrand

Am 16.12.2009 um 00:59 schrieb Subscriptions:

Fellow Saxons,

I was hoping I could use Saxon to post output documents directly to a content engine running on Jetty. 

I am trying to skip the 'generate content to disk' step and directly upload from XSLT using <XSL:Result-Document> having noticed that Michael Kay said folks had successfully used it with ftp and mailto.

My sample XSLT reads as follows:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="2.0">
    <xsl:output name="outputDefinition" method="xml" indent="yes" encoding="UTF-8"/>
    <xsl:template match="/" name="main">
        <xsl:variable name="Url" select="'http://localhost:8983/solr/update'"/>
        <xsl:for-each select="/document/content/section">
            <xsl:result-document href="{$Url}" format="outputDefinition">
                        <field name="id"
                        <field name="contextNumberPages">92</field>
                        <field name="contextTOCCount">20</field>
                        <field name="contextNumberSections">20</field>
                        <field name="contextNumberSubSections">1259</field>
                        <field name="contextHasPageBreaks">true</field>
Unfortunately, when I try this running this from Oxygen 11.0 and get the following error:

Engine name: Saxon-HE
Severity: fatal
Description: Failed while closing output file - 400 Bad Request for: http://localhost:8983/solr/update
Start location: 27:0

HTTP ERROR: 400 “missing content stream

For reference, the following is the simple command I would give using a utility like Curl to achieve an HTTP based upload:

C:\curl http://localhost:8983/solr/update/ -F stream.file=C:\FormattedContentFromXSLT\MyUploadContent.xml

Michael Müller-Hillebrand: Dokumentations-Technologie
Adobe Certified Expert, FrameMaker
Lösungen und Training, FrameScript, XML/XSL, Unicode
Blog: http://cap-studio.de/ - Tel. +49 (9131) 28747