Re: When and how are xs:anyURI references made absolute?

[ To be clear, in what follows, I’m trying to explore the problem space and expressing some personal opinions; I’m not trying to claim any resolutions. ]

George Bina <george@oxygenxml.com> writes:
> Imagine this was a built-in step, it makes sense to have such a step
> probably as a built-in step, what type you would have used for its
> options? Not xs:anyURI for sure, because it will not work for exactly
> the reasons you mentioned, the local URI reference is resolved for
> built-in steps.

and later

> Thinking more about this... a difference between a built-in step and a user defined step is that the custom step does not have access to the base URI of the option in the caller step. If that will be available, via some function for example, then the user defined step may use it to resolve a relative URI and provide a behavior similar to the built-in steps.

First, p:namespace-rename *already* exists and does have options of type xs:anyURI. (Perhaps this is an error, but that’s the way things are today.)

Second, I would be strongly opposed to any attempt to have different rules for builtin steps than for user defined steps. Users shouldn’t have to know and we’ve been clear from the start that an implementation might make a builtin step for something that was a user defined step in another implementation.

> XML Schema uses '##local' to mean no namespace in some contexts, for
> example:
> ***
> The empty string, though it is a legal URI reference, cannot be used
> as a namespace name.

We could have made that rule for p:namespace-rename, but we didn’t.

On a quick scan through the standard step library, I don’t see any other places where we don’t assert that a relative reference is made absolute according to the base URI.

So if we wanted to persue this change, we’d also have to change the type of the from and to options on p:namespace-rename.

It wouldn’t actually change any pipelines, but it would prevent this change from breaking p:namespace-rename.

                                        Be seeing you,
                                          norm

--
Norm Tovey-Walsh <ndw@nwalsh.com>
https://norm.tovey-walsh.com/

> Question consumption.

Received on Friday, 27 June 2025 16:24:02 UTC