Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Thank you for the thoughtful analysis. I'm sure we'll talk about this over the next couple of days, but just a passing observation: with respect to having functions that only operate on the context node, you say that this means the
<p:variable name="properties" select="$variable/p:document-properties()" />
I don't think we gain anything by removing the argument. I think the answer is that the implementation is required to keep some sparkle around. If you pass (explicitly or via the context item) an item that has as it's ancestor a node that was an XProc document with properties, you get those properties.
I don't feel strongly, at the moment, about non-XProc documents. I think users will be least surprised if properties are manufactured for content type and (where applicable) base URI.
The 'base-uri' and 'content-type' properties will always return a value; for a node, the base URI property will be returned if it has one and the content type will be appropriate for that node type; for maps, arrays, and other atomic values, the base-uri and content-type are ().