Re: XSLT non-XML output (was: standard components edits)

On 4/17/07, Innovimax SARL <innovimax@gmail.com> wrote:
>
>
> Hi Jeni,
>
> On 4/17/07, Jeni Tennison <jeni@jenitennison.com> wrote:
> >
> > Hi Mohamed,
> >
> > > Ok so the output of an XSLT transformation of type text or html should
> > > be outputted to a parameter, is it ?
> >
> > IMO, the result of an XSLT transformation is always a (sequence of)
> > documents (node trees). It's only when they're serialised (a separate
> > step, with no output) that you might get a text or HTML document.
>
> That's interesting ! And I share part of your concern
>
> But are we going to tell to people that already have crafted their
> foo2csv or foo2html xslt stylesheet, that if they want to put it into
> XProc, they won't be able to do that ?
>
> I'm not telling I want all and everything in XProc because people
> would ask it, but if we want  XProc to ignit fast, we have to take at
> least care of one transformation : XSLT !!


I think we do need to handle declaration of "serialization intent".  When
an XSLT transformation is used via and API like JAXP, you can
completely ignore the output method.  A "good" application looks
at the output method and attempt the same serialization as specified
by the stylesheet author.

I would be good for us to have a way for a pipeline author to
say "the output port 'x' of this pipeline needs HTML serialization".  There
are specifications we can point to (e.g. the XQuery/XSLT 2.0 serialization
specification) for what the methods mean.

If you stick an XSLT transformation in the middle of a pipeline and
produce non-XML and a port consumed by another specification, that
is a currently an error and I'd be happy leaving it as such for V1.  If
you want to handle text output, you can wrap your transformation by
importing your original stylesheet.  Other output modes (like 'html') can
easily be ignored by the step (which is something we need to say something
about).



-- 
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics

Received on Tuesday, 17 April 2007 14:41:42 UTC