How to use Oxygen XML Editor to develop DSL IDE?
Posted: Mon Feb 12, 2018 9:08 pm
Hi,
I've been using Oxygen XML Editor for a while, but my main job is to focus on XML document editing, XSD design, validation, and XSLT transformations, it's really good.
Now, I want to use XML to create DSL (domain-specific-language). My DSL is a kind of data instance definition language:
There are no processes or functions, but it still has some concepts such as variables, external file import, symbol scoping, cross reference, inheritance and so on. The purpose of the DSL is to facilitate users to quickly input data because there are many duplication parts in the data.
You can see these data as a form of serialization of the Java object, but the user can edit it directly.
My question is:
Does Oxygen XML Editor support the development of such DSL IDE? (or general programming language which like XSLT?)
For example, support content completion just like using Oxygen XML Editor to edit XSLT file.
Imagine, If we have some language which very like XSLT, how to use Oxygen XML Editor to implement IDE for this. (no need execute, only editing and validation)
I know that XSD can be seen as the grammar of DSL, and we also can use Schematron/XSLT for semantic validation, but they have some shortcomings:
(1) XSD-based content completion (default) in Oxygen XML Editor only support relationship of containment, it does not support cross-reference.
What I really want is something like editing XSLT in Oxygen XML Editor, for example:
When we writing <xsl: value-of select = ", Oxygen XML Editor will prompt $v1. This is scoping base cross-reference content completion.
(2) Schematron/XSLT is declarative rather than imperative. So there is no way to do some optimization.(eg: dynamically cache at runtime), there may be performance issues.
So, how does Oxygen XML Editor support the development of such DSL IDE?
I found that we can create Content Completion Configuration, but I don't know how to use it.
Or we should write Java Plugin?
What are the Best Practices?
Thanks.
I've been using Oxygen XML Editor for a while, but my main job is to focus on XML document editing, XSD design, validation, and XSLT transformations, it's really good.
Now, I want to use XML to create DSL (domain-specific-language). My DSL is a kind of data instance definition language:
There are no processes or functions, but it still has some concepts such as variables, external file import, symbol scoping, cross reference, inheritance and so on. The purpose of the DSL is to facilitate users to quickly input data because there are many duplication parts in the data.
You can see these data as a form of serialization of the Java object, but the user can edit it directly.
My question is:
Does Oxygen XML Editor support the development of such DSL IDE? (or general programming language which like XSLT?)
For example, support content completion just like using Oxygen XML Editor to edit XSLT file.
Imagine, If we have some language which very like XSLT, how to use Oxygen XML Editor to implement IDE for this. (no need execute, only editing and validation)
I know that XSD can be seen as the grammar of DSL, and we also can use Schematron/XSLT for semantic validation, but they have some shortcomings:
(1) XSD-based content completion (default) in Oxygen XML Editor only support relationship of containment, it does not support cross-reference.
What I really want is something like editing XSLT in Oxygen XML Editor, for example:
Code: Select all
<xsl:template match="/">
<xsl:variable name="v1" select="'foo'"/>
<xsl:value-of select="$v1"/>
</xsl:template>
(2) Schematron/XSLT is declarative rather than imperative. So there is no way to do some optimization.(eg: dynamically cache at runtime), there may be performance issues.
So, how does Oxygen XML Editor support the development of such DSL IDE?
I found that we can create Content Completion Configuration, but I don't know how to use it.
Or we should write Java Plugin?
What are the Best Practices?
Thanks.