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

Should we use uri-collection() for determine whether binary resources exist or not #21

Open
joeytakeda opened this issue Nov 6, 2019 · 3 comments

Comments

@joeytakeda
Copy link
Collaborator

Unlike collection(), the function uri-collection() makes no attempt at parsing the document it finds in its collection (since Saxon 9.7); it simply just lists all of the URI's in the collection: https://www.saxonica.com/html/documentation/sourcedocs/collections.html.

So we could list ALL URIs in the project from the outset and then just resolve paths to see whether or not the thing exists.

@martindholmes
Copy link
Collaborator

Sounds like a great idea -- but what do you mean by "just resolve paths"?

@joeytakeda
Copy link
Collaborator Author

I meant that, during our path resolution steps, if we have something like:

graphic:myImage.jpeg

And we know that "graphic" resolves to "../../graphics/"

Then we can resolve ../../graphics/myImage.jpeg into a full URI:

/path/to/my/project/graphics/myImage.jpeg

and then simple see if that path exists in the uri-collection() sequence.

@martindholmes
Copy link
Collaborator

Got it, thanks!

@joeytakeda joeytakeda self-assigned this Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants