Re: Thinking about port set expressions and block expressions

Alex Miłowski <alex@milowski.com> writes:
> Can steps query the readable ports by type and other metadata?

I can see the appeal, but I think it’s going to lead very quickly to a
lot of complexity. Given

  [source=$in, stylesheet=$style] -> xslt()

the by-name mapping is easy to explain. Given

  [$in, $style] -> xslt()

the ordinal mapping is also easy to explain.

If $in happens to have a content type of “application/xslt+xml” and
$style happens to have a content type of “application/xml”, then it’s
logically reasonable to suggest that $in should be used as the
stylesheet and $style should be used as the document, but I think that
would be very difficult to explain as an alternative to the preceding
two cases.

It’s also unclear what the content type of a sequence of documents
means.

I think we might provide a step that can filter based on content type,
then a pipeline author could do it by hand, in the very rare case that
it wasn’t statically knowable.

 [source=($in,$style)] -> content-type(match="application/xml+xslt") >> $ss
 [source=($in,$style)] -> content-type(not-match="application/xml+xslt") >> $doc
 [$doc, $ss] -> xslt() …

                                        Be seeing you,
                                          norm

-- 
Norman Walsh
Lead Engineer
MarkLogic Corporation
Phone: +1 512 761 6676
www.marklogic.com

Received on Friday, 15 April 2016 19:08:38 UTC