-
Notifications
You must be signed in to change notification settings - Fork 9
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
All elements need id(?), strategy for generating ids #14
Comments
Do we expect people to alter the DOM tree a lot (i.e. are their risks of clashes if we use a simpler scheme)? Otherwise maybe tag name + a counter is more concise? |
@rvosa Yeah, I'm not sure -- still trying to wrap my head around this one. Most users will probably only use the top-level API for writing an Or in more concrete terms, I have this In other news, the validator complains that UUIDs aren't valid id attributes:
|
On Aug 14, 2013, at 10:59 PM, Carl Boettiger wrote:
|
What do the UUIDs look like? The schema specifies that the type of @id is On Thu, Aug 15, 2013 at 5:50 AM, Hilmar Lapp notifications@github.comwrote:
Dr. Rutger A. Vos |
On Aug 15, 2013, at 5:44 AM, Rutger Vos wrote:
UUIDs can start with a digit. @cboettig: I suggest that if you choose UUIDs, you put them in the form of a urn:uuid: scheme. See http://www.ietf.org/rfc/rfc4122.txt |
IDs need to be non-colonized names, i.e. strings without colons. If I On Thu, Aug 15, 2013 at 4:16 PM, Hilmar Lapp notifications@github.comwrote:
Dr. Rutger A. Vos |
On Aug 16, 2013, at 6:27 AM, Rutger Vos wrote:
So HTTP URIs can't be IDs? |
Not normally. However, IDs can become part of HTTP URIs when transforming documents to RDF as they are then made globally unique by prefixing them with either the location of the document or the value of xml:base of the nearest ancestor node that contains this attribute. (Note that I didn't just make this up or anything.) I see where you're going with this line of questioning. If we want HTTP URIs as IDs (good id(ea)), use xml:base. |
I was just using the uuid package, which generates uuids that look like:
No colons, so I'm not sure why the validator (accessed with the R wrapper to Regardless, not sure uuids were a good idea for this purpose anyhow. The current workflow doesn't give the user the same flexibility over the DOM directly, so we probably don't have to worry about a user creating two S4 "tree" objects and then sticking them in the same nexml with duplicated IDs. Instead, there is a method for |
Okay, I think we're happy with our only locally unique ids for the moment. (Though still unsure what was wrong with the uuid above according to the validator...). Anyway, closing this issue. |
It appears that strings starting with a number were not valid ids (and uuids often start with numbers). To address this, all functions that assign ids use the internal method The command
|
Need to generate ids for nodes such as
<otus>
and<trees>
, etc. Should we useuuid
for this?The text was updated successfully, but these errors were encountered: