Re: [EXTERNAL] - Getting rid of @sequence="true/false"?

"Imsieke, Gerrit, le-tex" <gerrit.imsieke@le-tex.de> writes:
> I don’t think it will fit well into content-types.
>
> But we can think of allowing the as attribute also on input and output ports, like this:
>
> <p:input port="source" as="document-node(element(*))*"/>
>
> or
>
> <p:output port="result as="document-node()"/>

If “as=” takes an XPath sequence test, then I don’t see how to make
that work with non-XML outputs. If it doesn’t take an XPath sequence
test, then it’s going to be inconsistent with all the other uses of
“as=”.

> As long we don’t permit arbitrary XDM items on ports, we need to raise
> an error though (statically?) if the declared sequence type is atomic,
> a map, or anything else except item() or document-node().

item() includes atomics. Since we allow binary nodes, I’m not sure why
we’d forbid arbitrary XDM values (how is an xs:integer not an example
of binary?)

I suppose we could say that “as=” is a sequence test with the special
rule that document(), document()?, document()*, and document()+ may
match non-XML documents.

Maybe.

                                        Be seeing you,
                                          norm

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

Received on Monday, 25 September 2017 15:36:03 UTC