Skip to main content



      Home
Home » Modeling » Epsilon » Including pinset dataset into markdown file using picto(When using picto for markdown files it is possible to include plantuml seamlessly, however including csv pinset datasets fails)
Including pinset dataset into markdown file using picto [message #1856210] Mon, 28 November 2022 02:22 Go to next message
Eclipse UserFriend
Hello all,
firstly I'd like to thank you for the awesome work on Epsilon and share with you that I am really amazed by everything that is possible to accomplish with Epsilon!

I am currently working on a project where one of the features is to generate a markdown document including diagrams and tables. This file is currently included into a picto view for the purpose of having the document enhanced with existing diagrams and tables.

When rendering the file in the picto view the diagrams work fine. However, the included tables (from pinset) are broken and not rendered at all. In the visualization the following result appears:
"Attribute name "defer" associated with an element type "script" must be followed by the ' = ' character."

I looked around a bit and played around with the table generation code, thinking the problem was actually with the defer parameter. It is not. The issue seems to be with the browser widget interpreting the html (iexplore?! in my machine).

Therefore, I have set the SWT default engine to edge and chromium (in my eclipse.ini) to experiment. Unfortunately, even changing the widget default engine, both chrome and edge still fail to render the table with the same error!

I assume the issue could be that inclusion of the tables is not trivial as with the plantuml diagrams and this inclusion breaks the rendering for the markdown file (e.g. including the whole HTML information from tables?
Interesting enough, the beginning of the HTML rendering for diagrams is slightly different from the one from tables (e.g. no defer parameter) -- see below.

It would be great if I could get a pointer towards a solution on how to include tables from pinset into markdown, similarly to how this can be done with plantuml.

Thank you in advance!

Here how my current files look like for reference:
standalone.picto:
<?nsuri picto?>
<picto format="egx" transformation="documentation.egx" standalone="true">
    <model type="EMF">
        <parameter name="name" value="Documentation"/>
        <parameter name="metamodelUri" value="model"/>
        <parameter name="modelFile" file="../analysis/analysis.flexmi"/>
    </model>
    <view path="Documentation, Report (Markdown)" format="markdown" source="../transformations/Report.md"/>
</picto>


Report.md
## Overview Diagrams
<picto-view path="Structure, Overview Diagrams"/>

## Overview Tables
<picto-view path="Tables, Analysis Tables"/>


documentation.egx
rule AnalysisTables{

    template : "platform:/resource/epsilon_documentation/queries/table.pinset"

    parameters : Map {
        "path" = Sequence{"Tables", "Analysis Tables"},
        "icon" = "table",
        "format" = "csv"
    }
}


HTML snippet for diagrams:
<!DOCTYPE html><html>

    <head>

        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">

        <script src="https
://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script><script>mermaid.initialize({startOnLoad:true});</script>

    </head>

    <body style="zoom:1.0;">

        <svg xmlns="http
://www.w3.org/2000/svg"
     ....
    .....


HTML snippet for tables
<!DOCTYPE html><html>

    <head>

        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">

        <script src="https
://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script><script>mermaid.initialize({startOnLoad:true});</script>

        <link href="https
://cdn.metroui.org.ua/v4/css/metro-all.min.css" rel="stylesheet">

        <script defer src="https
://cdn.metroui.org.ua/v4/js/metro.min.js"></script>

    </head>

    <body style="zoom:1.0;">

        <table class="table striped table-border row-hover" data-horizontal-scroll="true" data-pagination="true" data-role="table">

            <thead>

                <th data-format="number" data-sort-dir="asc" data-sortable="true">ID</th>
.....
.....
Re: Including pinset dataset into markdown file using picto [message #1856228 is a reply to message #1856210] Mon, 28 November 2022 15:44 Go to previous messageGo to next message
Eclipse UserFriend
Indeed, there is an internal issue on how Picto parses the generated table HTML (e.g. it does not like the defer attribute, or the link tag, because they are not proper XML and they are parsed as such).

I'm working on a fix, I'll write here any advances in the following days.
Re: Including pinset dataset into markdown file using picto [message #1856232 is a reply to message #1856228] Mon, 28 November 2022 19:14 Go to previous messageGo to next message
Eclipse UserFriend
Hi Raphael,

Thanks taking the time to report this and for your positive feedback! I've created an issue to keep track of our progress with this.

Thanks,
Dimitris
Re: Including pinset dataset into markdown file using picto [message #1856237 is a reply to message #1856228] Tue, 29 November 2022 01:59 Go to previous messageGo to next message
Eclipse UserFriend
Hey Dimitris, Alfonso,
thanks for the quick reply!

I will keep an eye on that ticket and on the forum!
I hope the fix is not too complex to implement.

Take care
Raphael.
Re: Including pinset dataset into markdown file using picto [message #1856504 is a reply to message #1856210] Tue, 13 December 2022 10:33 Go to previous messageGo to next message
Eclipse UserFriend
Hi Raphael,

A fix has been pushed to Epsilon's interim version.

By default, iframes are now resized on load based on the size of the containing elements. If responsive resizing is desired, this can be activated by adding the attribute autoresize="true" to the picto-view tags of your markdown file. That feature loads and uses the external iframe resizer library: https://davidjbradshaw.github.io/iframe-resizer/

I'll update the Epsilon Website to reflect these changes.
Re: Including pinset dataset into markdown file using picto [message #1856528 is a reply to message #1856504] Wed, 14 December 2022 03:56 Go to previous messageGo to next message
Eclipse UserFriend
Hey Alfonso,
thank you very much for dedicating time to fixing this!
I will check the update. I will let you know in case I find any issues.

Take care
Raphael.
Re: Including pinset dataset into markdown file using picto [message #1856966 is a reply to message #1856528] Wed, 11 January 2023 03:40 Go to previous message
Eclipse UserFriend
I forgot to report here the new article: https://www.eclipse.org/epsilon/doc/articles/picto-embedded-views
Previous Topic:Bug in Flock Default Copy - Enums moved to resource
Next Topic:Customizing a GMF editor generated by Eugenia
Goto Forum:
  


Current Time: Mon Jul 28 17:43:00 EDT 2025

Powered by FUDForum. Page generated in 0.44849 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top