syllant / idea-plugin-xstructure

Plugin for Intellij IDEA which provides a flexible Structure view
9 stars 3 forks source link

Question: How to create mapping definition for certain kind of html? #8

Open Stefku opened 10 years ago

Stefku commented 10 years ago

What could be the approach to create a mapping definition for a file in reveal.js style? Since it doesn't have an xml schema, I don't know how to approach this.

The goal is to have an overview of the sections in the xstructure tool window.

<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title>d3.js - Live Hacking</title>
        /** cut out meta, script and css definitions **/
    </head>
    <body>
        <div class="reveal">
            <div class="slides">
                <section>
                    <h1>d3.js</h1>
                    <h3>Live Hacking</h3>
                    <p>
                        <small>Stefan Zeller</small>
                    </p>
                </section>

                <section>
                    <section>
                        <h2>d3 - the dom manipulator</h2>
                        <ul>
                            <li>Add elements to DOM</li>
                            <li>Change attributes of elements</li>
                        </ul>
                    </section>
                </section>
            </div>
        </div>
        /** cut out javascript stuff **/
    </body>
</html>
syllant commented 9 years ago

I'm afraid this is not possible if you are not able to specify the schema. I thought about adding alternative ways to identify mapping definitions (such as file name, XML structure, etc.), but nothing was done yet.

Stefku commented 9 years ago

Thank you syllant. Another alternative would be to add certain comment.