Posted by
Eric van der Vlist on
URL: https://discuss.orbeon.com/Serving-plain-text-tp26088p26097.html
Le jeudi 17 novembre 2005 à 16:41 -0500, Colin O'Brien a écrit :
> Hi Eric
>
> yes, I had already given in and started looking at the epilogue.
> I was happy to see that it has the instance as input, since that is
> where I know what view to use anyway.
> So it is easy to just test and do my own http-serializer.
>
> Except that the browser still shows the output arriving with the xml
> declaration.
Weird...
In 3.0, when I add the following "when" in the main p:choose:
<!-- Non XML documents -->
<p:when test="/document[@xsi:type]">
<p:processor name="oxf:http-serializer">
<p:input name="config">
<config/>
</p:input>
<p:input name="data" href="#xformed-data"/>
</p:processor>
</p:when>
I get my document served as text as expected.
It's not 100% safe, though since the "document" element belongs to no
namespace and there is a risk (at least in theory) that someone might
use this element in a custom vocabulary with a different meaning in
mind. That's why I have added a test that there is a xsi:type attribute
to reduce this risk.
I attach the pipeline that I have updated.
Eric
--
Carnet web :
http://eric.van-der-vlist.com/blog?t=category&a=Fran%C3%A7ais------------------------------------------------------------------------
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