First a generic comment on questions: if you want a somewhat complete solution, you need to give _all_ of the relevant data. If I can write a test case from the information you give, then I can start really working on it. If the test case is already written, than that's even better BTW.
Here you mention that some of the data is missing, so I can hopefully give you "a nudge in the right direction", but no more, and I can't even really understand properly what you want to do if I know that I am missing some pieces of the puzzle.
With that out of the way... let see if I can give you what you asked for ;--)
The expression that trigger handlers are that: expressions. They are not limited to just tag names. Look for twig_handlers in the docs (badly formatted version here). So you can certainly use an expression like UML:Attribute/UML:ModelElement.taggedValue/UML:TaggedValue[@tag="ea_guid"] to trigger a handler just when you need it.
In order to ignore the rest of the UML:TaggedValue elements, you can just not do anything with them, or if you want to actively prevent them from being included in the document tree, use the ignore method, but that's probably not worth the effort.
Does that help?
In reply to Re: Creating context-specific handlers in XML::Twig
by mirod
in thread Creating context-specific handlers in XML::Twig
by bobf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |