Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behavior of pattern/@documents #21

Open
xatapult opened this issue Sep 6, 2021 · 6 comments
Open

Behavior of pattern/@documents #21

xatapult opened this issue Sep 6, 2021 · 6 comments
Labels
2025 A change made in preparing the 2025 edition clarification Discusses and clarifies ambiguities element pattern Issues relating to element pattern

Comments

@xatapult
Copy link
Collaborator

xatapult commented Sep 6, 2021

The ISO skeleton implementation resolves a pattern/@documents value as relative the source XML document's location. SchXslt resolves this as relative to the schema location.

The standard leaves this undefined. However, I think the ISO interpretation makes more sense: When a source document contains a relative reference to some other document, this path is usually relative to the source document. Resolving it relative to the schema document (which could be anywhere) does IMHO not make much sense.

It should be specified unambiguously.

@rjelliffe
Copy link
Member

rjelliffe commented Sep 7, 2021 via email

@dmj
Copy link
Member

dmj commented Nov 27, 2021

Agreed. Section 5.4.10 should be amended as follows:

The optional documents attribute provides IRIs of the subordinate documents the rule contexts are relative to. If the expression evaluates to more than one IRI, then the pattern is sought in each of the documents. Relative IRIs are resolved to the base IRI of the original instance document. The documents attribute is evaluated in the context of the original instance document root.

@rjelliffe
Copy link
Member

One important thing is that if multiple patterns are to validate the same @document, we dont want to have to download the same document each time. First, for efficiency, and second because the document may have changed between retrievals.

So I have added text to the General Clarrification page. Probably it can be clarified.

(Also, I have corrected the stripped out Xpaths in this issue.)

@AndrewSales AndrewSales added the element pattern Issues relating to element pattern label Jun 19, 2023
@AndrewSales
Copy link
Collaborator

we dont want to have to download the same document each time. First, for efficiency, and second because the document may have changed between retrievals

Indeed, in the case of XPath-derived language implementations, this would align with the behaviour of fn:doc(), which is deterministic by default.

@AndrewSales
Copy link
Collaborator

Relative IRIs are resolved to the base IRI of the original instance document.

Amended in latest draft - thanks.

@AndrewSales
Copy link
Collaborator

we dont want to have to download the same document each time. First, for efficiency, and second because the document may have changed between retrievals.

I've also added a recommendation about this -- I don't think we should mandate it, in case there are query languages which can't/don't support it, or it may be that a use case requires non-deterministic operation.

@AndrewSales AndrewSales added the 2025 A change made in preparing the 2025 edition label Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2025 A change made in preparing the 2025 edition clarification Discusses and clarifies ambiguities element pattern Issues relating to element pattern
Projects
None yet
Development

No branches or pull requests

4 participants