I want to get the value of href in the importedPackage.According to the uml class meta-model,the type of importedPackage is "uml:Model",but my match rule package2entity cannot identify it,my rule like this
id <- s.__xmiID__,
My packageimp2entity rule can identify the packageImport element,the rule listed below
subEntities <- s.importedPackage
But I don't know how to get the href value.Expression s.importedPackage can match an outside package,not the child element of packageImport.Any help will be appreciated.
href is not an attribute or reference of the PackageImport element, it is an XMI serialization-specific feature that is not intended to be handled manually at the model level.
In order to know the model elements (and corresponding attributes/references) you can actually handle, you should take a look to the UML2 metamodel.
Generally, to avoid this kind of misunderstanding, I encourage you to open your metamodels and models with a model editor/browser rather than reading them in XMI (which can be often quite confusing). You can use the generic MoDisco Model Browser for instance.