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
What is the default base URI for documents created by the standard steps? #308
In the course of examining the consequences of an archive (passed to
My implementation makes the base URI of documents created by steps the same as the step unless there's some overriding value. For example, the documents created by
I think there are several reasons why this is a good idea:
Achim, quite reasonably I think, took the position that the documents produced by those steps have no base URI.
We must clarify this. I assert that this is a step spec issue (not a language spec issue) because I think it's a question about the behavior of the standard steps. Someone writing their own steps might choose to take a different approach.
We should try to resolve this quickly as it's a lot of work for one of us to change our implementation.
I do not think this is a step issue, but must be stated in the core specs. If we want this behaviour, then it must be the same for EVERY atomic step a processor know, i.e. not only those specified by the step specs, but also by processor defined steps or by steps defined in third party package.
As user I think (hmm, not sure) I would expect that a document generated by some step where there is no clear ancestor before the step (like p:count etc.) has no base-uri. Because it appeared out of "nothing".
If we must give it a base-uri for some reason, then it should be the base-uri of the step. But again, I think it should have none. This preference is not very strong and I have a feeling I don't oversee all consequences, pros and cons. So, I would not stand in the way of a solution where the base-uri of the step was used.
About in the core spec or not: Why should it be in the core spec? We could record it as a preferable behavior, but I don't see any problem in custom steps taking different directions here.
Let’s define what documents created by steps are, whether there is a difference between documents modified by steps and documents springing into existence from a step.
Then I wonder what you mean with “a step’s base URI”. I think you mean the base URI of the pipeline document that uses the step in question, as opposed to a document that the step was declared in. The latter is unavailable for processor-implemented steps, or there will only be
As in the case of whether manipulating the
With the current question, we should at least provide a bit more of explicit clarity. At least we should say that in cases where the document properties are preserved, so is the base URI. (I think you can only reasonably speak of property preservation if a step has a single input port that is primary and a single output port that is primary.) And in cases where the
This is of course inconvenient for pipeline authors as it may limit their pipeline’s portability.
In practice, it probably won’t be much hassle since it will rarely be an issue that certain documents don’t have a base URI. You wouldn’t do anything with a
By my reading, that's two votes for "shouldn't have a base URI" and one observation that not having a base URI would rarely be a problem. I think the fact that we've come this far without noticing that our implementations differ on this point supports the assertion that it'll rarely be a problem.
I propose that my implementation is in error and steps that say "no properties are preserved" should have no base URI.
I'm not even sure that any spec changes are necessary.