-
Notifications
You must be signed in to change notification settings - Fork 28
fix: support namespace in aggregation name #150
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
Conversation
Aggregation tags must have the same namespace as their parent control tag. This is now supported in code completion, validations and hover. Additionally, don't filter out the current aggregation during code completion.
* Split possibly qualified tag or attribute name to namespace and name | ||
* @param qName | ||
*/ | ||
export function splitQNameByNamespace( |
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.
This possibly belongs in XML-ToolsQName
is ambiguous, is this "x.y.z" (regular fqn) or XMLNs fqn "foo:bar"
There is no way to tell from the docs.- I know its the xmlns name... so in that case it should use xmlns terms, e.g:
- ns --> prefix
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.
This possibly belongs in XML-Tools
Actually I agree, but I don't think I'll have time to move it this sprint.
QName
is ambiguous, is this "x.y.z" (regular fqn) or XMLNs fqn "foo:bar"
There is no way to tell from the docs.
I'll improve the comment to make it clearer that it's related to xml qualified names.
I know its the xmlns name... so in that case it should use xmlns terms, e.g:
- ns --> prefix
Ok
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 know its the xmlns name... so in that case it should use xmlns terms, e.g:
- ns --> prefix
On the xml element it's called ns
, even though it's the prefix and not the resolved namespace.
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.
Changed
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.
On the xml element it's called ns, even though it's the prefix and not the resolved namespace.
Yes that is a mistake I've made, but fixing that would be a serious breaking change
ns: matchGroups.ns, | ||
name: | ||
matchGroups.name ?? | ||
/* istanbul ignore next */ |
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.
why is this branch ignored?
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.
Actually it's unnecessary, I'll remove the ??
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.
Changed
Do the namespace prefixes need to be syntactically equivalent or could they also be resolved to the same namespace? e.g:
|
I tested it now and it seems that they can be equivalent instead of the same prefix (non-default and default or both non-default - it works). As a side note, I could not get |
Fixed |
"Work" in what context? |
* Return the xml namespace defined for the xml element prefix (ns), or undefined if not found | ||
* @param xmlElement | ||
*/ | ||
export function resolveXMLNS(xmlElement: XMLElement): string | undefined; |
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.
👍
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.
These are all very useful utils, we will need to move them to XML-Tools at a later time though
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.
Agreed
It doesn't work, as in, I get a runtime error that "content" was not found, and it seems that it searches for it by URL like it's a class. |
If we have a runtime error we need to open a bug with reproduceable test case |
Aggregation tags must have the same namespace as their parent control tag.
This is now supported in code completion, validations and hover.
Additionally, don't filter out the current aggregation during code completion.