Widoco icon indicating copy to clipboard operation
Widoco copied to clipboard

New style according to respec

Open dgarijo opened this issue 9 years ago • 9 comments

See the style used here: http://w3c.github.io/dwbp/vocab-du.html Is it possible to incorporate to the document?

dgarijo avatar May 01 '16 14:05 dgarijo

Other references that seem more mature in terms of respec https://www.w3.org/TR/vocab-ssn/ (This might take some time)

dgarijo avatar Jun 01 '17 22:06 dgarijo

And another style: http://w3c.github.io/sdw/time/# (similar to the first one)

dgarijo avatar Jun 06 '17 16:06 dgarijo

Hi. If the HMTL output is changed to utilise a templating language (e.g. jinja2 - jinjava) - then creating such templates can be easier to do as well as encourage community to build and provide such templates. Because the underlying Java code would now be separate from the output. E.g.

generator.java
GenerateDocumentation(classes=<list of classes>, properties=<list of properties>, instances=<list of instances>)
spec.html.jinja2
<h2>Overview</h2>
<h3>Classes</h3>
<ol>
{% for concept in classes %}
    <li>{{ concept }}</li>
{% endfor %}
...
...
<h2>Documentation</h2>
<h3>Classes</h3>
{% for concept in classes %}
    <div class="concept-box">
        <p><strong>title:</strong> {{ concept.title }}</p>
        <p><strong>in domain of:</strong> {% for property in concept.properties_domain %}{{ property }}{% endfor %}</p>
    </div>
{% endfor %}

This could be more work than I'm imagining, because it needs creating abstract strcutures for each concept that provides easy access to underlying information, i.e. concept.title, concept.description (or similar in Java syntax). I've implemented a similar mechanism for dpv for producing reSpec output - see code. I'd like to switch over to WIDOCO if reSpec can be generated with similar customisation options (i.e. via templates).

Edit: I'm willing to work on such templates for LODE and reSpec style outputs (not a good Java programmer though!)

coolharsh55 avatar Sep 15 '22 10:09 coolharsh55

The core of the doc is generated using a templating language: an xslt transformation (from Lode, adapted). Changing everything into a new templating language is a significant amount of work. But there are parts which do not use jinja, and live in the code (like the header). Help in those would be appreciated :)

That said, we can assess how much work it would require.

dgarijo avatar Sep 15 '22 11:09 dgarijo

@coolharsh55 I think the problem here was not adapting the HTML (as it was already produced using templates). But adapting the CSS to the new style. Last time I did this we just needed a new CSS file, and then change the path to it if the style was selected.

dgarijo avatar Sep 15 '22 11:09 dgarijo

Thanks Daniel. I will look at the XSLT and try to see if I can help using this instead of proposing a new thing. For ReSpec, there is more than just the CSS though - because there's a JSON object in the <head> that expects metadata e.g. link to GitHub repo, editors, and so on that would be better to provide as well (via the template). I will also see where in the XSLT this is relevant and whether this can be provided when a style option is selected.

coolharsh55 avatar Sep 15 '22 12:09 coolharsh55

See work by Ghislain in this direction: https://linkedvocabs.org/data/ersadDocumentation/doc/index-en.html#toc

dgarijo avatar Nov 28 '23 11:11 dgarijo

See work by Ghislain in this direction: https://linkedvocabs.org/data/ersadDocumentation/doc/index-en.html#toc

Thanks! Looks good. How do I see the source / steps?

coolharsh55 avatar Nov 28 '23 12:11 coolharsh55

Not sure yet!

dgarijo avatar Nov 28 '23 12:11 dgarijo