Skip to content
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

xpath support #16

Open
mchlrch opened this issue Jul 9, 2019 · 2 comments
Open

xpath support #16

mchlrch opened this issue Jul 9, 2019 · 2 comments

Comments

@mchlrch
Copy link
Member

mchlrch commented Jul 9, 2019

  • XPath functions for where it's needed (split-equivalent)
  • XPath completion when possible (create an index of all paths)

Goal: A standalone CLI tool that reads out XML paths, generates the appropriate EMF object model for a LogicalSource and then serializes into DSL text.

xrm-cli -extract-sources -xml foobar.xml > foobar-sources.xrm

@mchlrch mchlrch added the xml label Jul 9, 2019
mchlrch added a commit that referenced this issue Oct 30, 2019
@mchlrch
Copy link
Member Author

mchlrch commented Nov 12, 2019

Here's one approach for implementing this functionality:

  1. Inspect XML to get inventory of paths, include the path inventory in XmlLogicalSource (build AST and serialize DSL file). I haven't done much with XPath so far, so I don't know, if the paths will be
    Sprachzonen/Sprachzone[attribute::Sprache='DE']/Synonym[attribute::Nr='1']/Definition[./Typ='ab']/Text or only
    Sprachzonen/Sprachzone/Synonym/Definition/Text

  2. Implement proposal provider for Referenceable.value. Create proposals based on the path inventory.

  3. Add validation rule that checks Referenceable.value to be valid XPath

@mchlrch
Copy link
Member Author

mchlrch commented Nov 13, 2019

  1. Implement proposal provider for Referenceable.value. Create proposals based on the path inventory.

It makes sense to first play with the proposal provider and check if that approach is workable, before implementing the other parts

@mchlrch mchlrch added the cli label May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant