-
Notifications
You must be signed in to change notification settings - Fork 418
OAK-9586: SysViewImportHandler does not support expanded names in sv:name attributes #2223
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
base: trunk
Are you sure you want to change the base?
Conversation
…name attributes Prelimary fix, needs beautification.
Commit-Check ✔️ |
} catch (NamespaceException expected) { | ||
// this is an expanded svName using an unregistered namespace | ||
// we need to make up a prefix for the namespace | ||
prefix = "ns_" + UUID.randomUUID().toString().substring(0, 8); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's temporary. We already have other places where we create ns prefixes, I'm going to clone from there.
…name attributes Test cases.
…name attributes Added comment.
…name attributes Renamed private method.
|
return "ns_" + UUID.randomUUID().toString().substring(0, 8); | ||
} | ||
|
||
private NameInfo createNameInfo(String svName) throws RepositoryException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this whole logic should be common across all JCR methods potentially creating new items (with potentially unregistered expanded names) such as
Node.addNode(...)
Node.setProperty(...)
Session.move(...)
Probably one needs to add a SessionContext.getOrCreateOakPath(...)
similar to the getOakPath(...)
which is called from all those methods. The implementation should delegate to a new method PathMapper.getOrCreateOakPath(...)
which should automatically register all unknown prefixes.
Prefix generation is preliminary.