-
Notifications
You must be signed in to change notification settings - Fork 18
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
366 xsl:package-location #1888
base: master
Are you sure you want to change the base?
366 xsl:package-location #1888
Conversation
3.5.3
Additional condition: the value of
The word "file" is widely used throughout the new text. I think more common W3C practice is to use "resource". And a URI doesn't "point to" a resource, it is dereferenced to deliver a resource. I think in the general case you should identify that the resource is an archive by means of the media type in the HTTP response, not by the URI scheme used to fetch it. In any case, if the package is in a local JAR or ZIP file, it's going to use the "file" URI scheme, and you're going to use either the file extension or peeking at the initial octets to identify it as an archive. We need a note somewhere that the URI in the href attribute, after resolving as described in 5.9, may be dereferenced via an indirection mechanism such as a user-supplied URI resolver or catalog. I'm wondering also whether we should make explicit provision for resolving using the combination of a repository URI (e.g "maven central") and an artefact ID within that repository. Perhaps just add an |
It might be simpler to allow any priority value, and to say that if the priority is >= 0, the location is used in preference to any implementation-defined location, while if it is <=0, it is used only as a fallback when implementation-defined mechanisms fail. It might be worth spelling out that for priority, a high number represents a higher priority than a low number (since the opposite convention is in common use). |
I think the main thing is to exercise all the syntactic options. Tests in this kind of area tend to be difficult for a number of reasons: (a) some of the detail tends to be implementation-defined, (b) it's easy to end up testing the test driver rather than testing the product, (c) we don't have a reliable way of accessing HTTP resources from tests. Just do the best you can! |
Given that JAR file URIs are not really standardized, I wonder if they too should be handled by a pair of attributes, one identifying the container, and the other the specific artefact within the container. |
First draft, for initial feedback.
Notes:
jar:
scheme/archive. Yes, I've seenzip:
used as an alias forjar:
, but it's not an official IANA URI scheme. This may need discussion.@priority
to a non-zero integer. This is the first time the constraint for the union of positive and negative integers has been placed on an XSLT attribute, so I may not have correctly set upelement-catalog.xml
.format
,name
, andversion
as criteria for the priority package location (new term), so that developers can be warned when the package is at odds with the declaration. To make them criteria would mean that inconsistencies between the declaration and the referenced packages would remain undetected.3000
has been broken up into different possible errors.