Skip to content

Add Plantuml variant (re #166)#471

Open
VladimirAlexiev wants to merge 12 commits into
w3c:gh-pagesfrom
VladimirAlexiev:issue-166-plantuml
Open

Add Plantuml variant (re #166)#471
VladimirAlexiev wants to merge 12 commits into
w3c:gh-pagesfrom
VladimirAlexiev:issue-166-plantuml

Conversation

@VladimirAlexiev

@VladimirAlexiev VladimirAlexiev commented Aug 5, 2025

Copy link
Copy Markdown
Contributor

Reopens #166: by using better technology (PlantUML) we can improve the diagram a lot more easily, and make new diagrams.
IMHO the PlantUML code is more readable than the textual diagram,
and it produces real arrows (doesn't depend on the Class-Diagram-Arrows.png kluge)

image
  • added link NodeShape->PropertyShape
  • broke the long text to 2 lines
  • shown PropertyGroup
  • added sh:order to PropertyShape and PropertyGroup

These are minor fixes, but the point is that with PlantUML we can maintain more easily, add more diagrams (eg Node Expressions), and make more kinds of diagrams.

See SVG diagram rendered at plantuml server

  • Try out the links: they work and are relative
    • There's skinparam topurl https://raw.githack.com/w3c/data-shapes/master/shacl12-core/index.html in the .puml file but we should try to leave it out and see whether the links use as base the HTML URL (good) or the SVG URL (bad)
  • There's a Makefile that produces SVG using a local plantuml installation
  • We want to use a local installation instead of the plantuml server because the build shouldn't depend on an external server
  • class label should support creole link rendering plantuml/plantuml#2290 There's was no blue underline on the class name (Update: added with tags <color:blue> and <u>). Note the whole node is clickable and goes to the class definition

If you agree, I can:

  • replace the textual diagram in the HTML with <img> tag
  • remove Class-Diagram-Arrows.png

Please check all links for accuracy!

Comment thread shacl12-core/images/SHACL-UML.puml Outdated
Comment thread shacl12-core/images/SHACL-UML.puml Outdated
Comment thread shacl12-core/images/SHACL-UML.puml Outdated
VladimirAlexiev and others added 2 commits August 6, 2025 19:51
Co-authored-by: Yousouf Taghzouti <48333491+YoucTagh@users.noreply.github.com>
Co-authored-by: Yousouf Taghzouti <48333491+YoucTagh@users.noreply.github.com>
@VladimirAlexiev

Copy link
Copy Markdown
Contributor Author

@YoucTagh Thanks for your close reading!!!!
Now do you agree with the next steps:

  • replace the textual diagram in the HTML with <img> tag
  • Check how the links behave when embedded in HTML
  • remove Class-Diagram-Arrows.png

@TallTed

TallTed commented Aug 6, 2025

Copy link
Copy Markdown
Member

As I noted in #166

Assuming that the diagram we finalize on does not include all features, it should include some ... or etc. or similar arrows/boxes/line-items — so it's clear that we're not showing everything in the diagram (which I think is entirely reasonable, even with automatic tooling, given the large number of features involved).

Also, note that Accessibility review will demand textual description of each diagram, usable with screen readers and other assistive technologies. So it's in our best interest to avoid overly complex diagrams, even if they're easily produced.

- sh:path : predicate or list or blank node and link to #property-paths
- add ellipsis as per TallTed
- rdf:List -> "list" because SHACL doesn't require the rdf:List type
- add sh:nodeKind, sh:ignoredProperties
@VladimirAlexiev

VladimirAlexiev commented Aug 7, 2025

Copy link
Copy Markdown
Contributor Author

@TallTed @YoucTagh I added a few more changes, can you please recheck?

@YoucTagh YoucTagh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, the content is good for me. I won't merge it; maybe we can figure out how to make the links work.

@VladimirAlexiev

Copy link
Copy Markdown
Contributor Author

@YoucTagh the links work now: https://raw.githack.com/VladimirAlexiev/data-shapes/refs/heads/issue-166-plantuml/shacl12-core/index.html#constraints-section.

@TallTed I can't yet add an accessibility description (<svg desc=) because plantuml/plantuml#2292.
Hopefully PlantUML will add such feature soon!

@TallTed TallTed left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much improved. There's always more, but this is a big step forward.

@HolgerKnublauch HolgerKnublauch added the Core For SHACL 1.2 Core spec label Oct 6, 2025
@YoucTagh

YoucTagh commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

@VladimirAlexiev Can we merge this PR?

@VladimirAlexiev

Copy link
Copy Markdown
Contributor Author

@YoucTagh yes, but the end of index.html should be like this (related to #486)

	<script type="text/javascript">

    // Load and inline SVG diagrams for clickable links
    // TODO: add <svg desc> for accessibility
    function svgInline(svg) {
      fetch('images/'+svg)
        .then(response => response.text())
        .then(svgText => {
          const container = document.getElementById(svg);
          container.innerHTML = svgText;
        })};

    svgInline('SHACL-UML.svg');
    svgInline('ValidationReport-UML.svg');
		
	</script>

@YoucTagh

Copy link
Copy Markdown
Contributor

@VladimirAlexiev, ok, thank you.

Once #487 is merged, we will update index.html and then merge it.

@VladimirAlexiev

VladimirAlexiev commented Oct 17, 2025

Copy link
Copy Markdown
Contributor Author

@YoucTagh I've added a few of the new features: core-components-list (3 fields), sh:targetWhere, sh:codeIdentifier:
https://raw.githack.com/VladimirAlexiev/data-shapes/issue-166-plantuml/shacl12-core/index.html#constraints-section

(note: I put back the link to PropertyGroup and it shows ok on
https://github.com/VladimirAlexiev/data-shapes/blob/issue-166-plantuml/shacl12-core/images/SHACL-UML.svg
but for some reason doesn't show on the preview link: I suspect a caching issue)

I tried this variant with extra links to NodeShape but I think the diagram gets too busy, so I omitted them (they are listed as fields)
image

@afs

afs commented Oct 17, 2025

Copy link
Copy Markdown
Contributor

Same concern as #483 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Core For SHACL 1.2 Core spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants