Posted by
Eric van der Vlist on
URL: https://discuss.orbeon.com/Serving-plain-text-tp26088p26089.html
I Colin,
Le jeudi 17 novembre 2005 à 15:00 -0500, Colin O'Brien a écrit :
> Hi,
>
> I have an instance now where sometimes I will need to transform some
> content to plain text. I'm still responding to an http request, the
> source is still in XML, it's dynamically generated (collated, sorted,
> filtered, etc), so I am of course thinking to do all this in OPS - I
> just need to deliver plain text.
>
> Since I wasn't sure I would get the format of the plain text file
> right, and I wasn't sure how it would make it to a browser, I added
> debug to my pipeline. So it took me a while to realize that when I got
> the error "Null document for debug 'dataout'" then it was not saying
> there was much wrong with my xslt, it was the debug itself that was the
> problem - it seems to be insisting on xml.
>
> Anyway, so now I can see my plain text in the browser.
> My xslt starts with <xsl:output method="text
> omit-xml-declaration="yes"/>
> and yet when the output reaches the browser, the first line is the xml
> declaration.
> It's the only "change" from what I am outputting.
> Could there be something in the epilogue doing this?
I am not sure how you're describing that in your pipeline, but OPS
pipelines are by definition XML and they always carry XML and only XML
even to convey non XML documents :-)..
Text documents are embedded in XML root elements such as:
<document xsi:type="xs:string" content-type="text/plain; charset=iso-8859-1">
This is line one of the input document!
This is line two of the input document!
This is line three of the input document!
</document>
http://www.orbeon.com/ops/doc/reference-formats#text-documentsThe standard epilogue doesn't filter these documents and send them as
XML...
If you want to serve them as text, you need to either modify the
epilogue of shortcut it bu using only a model in your page definition
and use the HTTP serializer to send your document to the browser (see
http://www.orbeon.com/ops/doc/processors-serializers-http#text-mode).
Hope this helps.
Eric
--
Don't you think all these XML schema languages should work together?
http://dsdl.org------------------------------------------------------------------------
Eric van der Vlist
http://xmlfr.org http://dyomedea.com(ISO) RELAX NG ISBN:0-596-00421-4
http://oreilly.com/catalog/relax(W3C) XML Schema ISBN:0-596-00252-1
http://oreilly.com/catalog/xmlschema------------------------------------------------------------------------
--
You receive this message as a subscriber of the
[hidden email] mailing list.
To unsubscribe: mailto:
[hidden email]
For general help: mailto:
[hidden email]?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws