Skip to content

Conversation

@VladimirAlexiev
Copy link
Contributor

@VladimirAlexiev VladimirAlexiev commented Aug 5, 2025

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!

@VladimirAlexiev
Copy link
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
Copy link
Member

TallTed commented Aug 6, 2025

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
Copy link
Contributor Author

VladimirAlexiev commented Aug 7, 2025

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

Copy link
Contributor

@YoucTagh YoucTagh left a comment

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
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!

Copy link
Member

@TallTed TallTed left a comment

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
Copy link
Contributor

YoucTagh commented Oct 9, 2025

@VladimirAlexiev Can we merge this PR?

@VladimirAlexiev
Copy link
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
Contributor

@VladimirAlexiev, ok, thank you.

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

@VladimirAlexiev
Copy link
Contributor Author

VladimirAlexiev commented Oct 17, 2025

@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
Copy link
Contributor

afs commented Oct 17, 2025

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