Join GitHub today
Open questions on p:viewport #849
I think we need to allow HTML documents also. And (if I am right with the next point) also Text documents.
I think this is a leftover from XProc 1.0. Since we now use XDM i think
I think we need to say more about what happens relative to the result's content-type.
I agree that we should allow HTML.
How is it useful to allow text documents? Adjacent text nodes are combined, so the document will consist of a single text node. The smallest select expression you can make on that is the whole node, so you'll replace the whole thing. (Or nothing.)
I'm still thinking about the JSON case. Does it makes sense to select a portion of the map or array? It might, but I haven't worked out if that's implementable or not. I'm certainly happy to make it an error in the short term.
I guess we should clarify that if you select the whole XML or HTML document and replace it with a text node, you get a text/plain document out.
I did not claim, it is very useful. But I see no reason to make it an error.
I think it would be useful, e.g. updating all values in a map with a certain key. But as far as I can see, we do not have an expression language to match portions of maps/arrays, have we?