S-101-Portrayal-subWG / Working-Documents

16 stars 5 forks source link

IHO S100SVG schemas and metadata details #103

Closed MikusRL closed 1 week ago

MikusRL commented 1 year ago

@rmalyankar Re S100SVG metadata from #28. You wrote:

"S-100 Part 17 does not apply to this "SVG metadata", nor do 4 or 4a. There isn't any documentation of SVG metadata apart from 9-B-2-4.

The SVG metadata schema is online at https://schemas.s100dev.net/ (scroll down to the Part 9 section and look for S-100 SVG metadata, it has only publisher, creationDate, source, format, version.)"

Thank you for this link. It is very helpful. I trust that we need here this issue open for to have a place where to discuss the unclear questions and news about the expected input for the metadata in the svg files to harmonized more or less before registered in the IHO GI Registy Portrayal Register.

If it would not be too much for one issue, we then could also include here questions on other svg encoding regarding how it is in the schemas.

MikusRL commented 1 year ago

In the #28 in the uploaded svg files for BOUMOR02 and 04 I updated the metadata based on what I could understand from the schemas from above link:

"...metadata>

MikusRL commented 1 year ago

@alvarosanuy As these schemas are now complete as version 5.0, I will ask IHO (Yong) if the existing IHO S100Toolkit, which includes the Symbol builder, could be brought up to date according to those. This also would help a lot in generating cleaner first versions or the basis for the symbols correstly from the beginning, and automatically or with some help at least populate the more up to date metadata fields.

rmalyankar commented 1 year ago

@MikusRL:

Another thing would be great, if the schemas could be updated also with the comment strings (green text in schemas) next to the elements, especially required ones, with the expected input string, at least up to date of the schema publising, or just one time add comment, noting the commenting date in the comment itself. It would guide in what is expected. Many times I find myself strugling especially in the metadata, what exactly they need to describe. Like when the date is required, is it the date the file is created, or is it the date of issue of the schema the file is compliant, etc. So it would be great if in couple of words explained the expected input. Would it be possible at some point to add these in the schemas you pointed to @rmalyankar? I trust it would be very helpful to many of us now and many others in the future, who would be finding these schemas wanting to create S-100 compliant svgs for their product specifications, and will prepare the svgs to upload as proposals to the GI Portrayal Register.

The explanations don't appear to be given anywhere, so what the content of schema comments should be is not clear to me either (and it's too late for Edition 5.0.0 schemas). This matter should be postponed to a future edition of S-100. Meanwhile, I think this S-101 Portrayal sub-group can create conventions (which might ultimately make their way into S-100 and the schemas as the requested explanations).

MikusRL commented 1 year ago

@HolgerBothien

I will not travel to Monaco but participate online. Unfortunately we can only discuss here or in MS-Teams if that is appropriate for you. Regarding the SVG profile I see many things to be discussed.

@TDYCARHugh

I am unable to attend the Monaco meeting due to a personal conflict. Happy to be involved in discussions about using/improving the SVG profile.

When I first made the S-100 SVG profile 7 years ago there was a desire to keep it as simple as possible. There was an expectation that some system developers would want to parse and implement the SVG directly instead of being forced to use a full SVG library. So I started with the SVG tiny profile and only included enough instructions to replicate the S-52 symbols. I expected that once other systems started implementing S-100 and product specs got involved in making symbols there would be requests to extend the profile.

@DavidGrant-NIWC

Sorry we won't see you guys in Monaco.

@TDYCARHugh - I agree that the S-100 SVG profile should be kept as simple as possible. However, I think there is ambiguity regarding what subset of SVG Tiny 1.2 is included in S-100. Appendix 9-B is marked normative, but it says:

This appendix describes the subset of SVG elements that have been used in the creation of S-100 SVG symbols and covers the set of SVG elements and associated attributes and properties that are in use by S-100.

* This note is specific to the draft S-101 symbol set.

* It doesn't describe what is actually required, it just says (paraphrasing) "this is what we are currently using". However, the next paragraph says:

The S-100 SVG profile is a subset of the SVG Tiny 1.2 profile http://www.w3.org/TR/SVGTiny12

The subset is not formally defined, so one is left to wonder if a particular SVG feature must be supported or not. I think the intent was to only require supporting the features listed in 9-B-2 and 9-B-3, but it doesn't actually say that anywhere. It says things like:

The style properties used in the draft S-100 SVG symbols include:

so, one is left to wonder if other symbol sets will use additional style properties. There are also some missing style properties that are currently in use: "fill-rule", "shape-rendering", "display", etc.

We have seen this ambiguity play out already - ESRI developed a windmill symbol and wondered why we didn't support the curve instruction (part of the "path" command) in our testbed. Here's what S-100 says about the curve instruction: image We have since added support for the curve instruction, but I'm not sure that other implementations will do so until they encounter a symbol which uses it.

So, this was all a long way of saying I think that appendix 9B should be updated for S-100 ed. 6, and it should make it clear exactly what is (and what is not) included in the S-100 SVG profile. I would also like it to specifically say that animation, multimedia, scripting, etc., are not supported.

I have moved some comments from Issue #112, and I propose we continue the discussion here under this Issue, so when we will close the Berth symbol, it will be possible to continue this discussion here.

In that regard what you mentioned @DavidGrant-NIWC I thought that the S-100 Schemas here: https://schemas.s100dev.net/ are now defining what is in, and anything what is not mentioned in there is "out". Or are these schemas not normative, and hence, now what is in these schemas should be respectively in detail be described in the normative part of S-100 standard?

rmalyankar commented 1 year ago

In that regard what you mentioned @DavidGrant-NIWC I thought that the S-100 Schemas here: https://schemas.s100dev.net/ are now defining what is in, and anything what is not mentioned in there is "out". Or are these schemas not normative, and hence, now what is in these schemas should be respectively in detail be described in the normative part of S-100 standard?

The schemas are normative and should be aligned to the appropriate edition of S-100. At present that is only Edition 5.0.

DavidGrant-NIWC commented 1 year ago

In that regard what you mentioned @DavidGrant-NIWC I thought that the S-100 Schemas here: https://schemas.s100dev.net/ are now defining what is in, and anything what is not mentioned in there is "out". Or are these schemas not normative, and hence, now what is in these schemas should be respectively in detail be described in the normative part of S-100 standard?

You are correct about the schemas (I confess that I had forgotten that they had been added), but they still don't resolve the ambiguity. For instance: image The style attribute is optional on the path element. When present, which styles must be supported (https://www.w3.org/TR/SVGTiny12/styling.html)? It's not specified anywhere (except kind of in the spec). Currently there is nothing to restrict someone from animating a path component.

Another example: the "d" attribute is required on the path element. What path data (https://www.w3.org/TR/SVGTiny12/paths.html#PathData) must be supported?

rmalyankar commented 1 year ago

Looks like Appendix 9-B needs a review and revisions, and the schemas would then be updated according to the results.

HolgerBothien commented 1 year ago

I agree with a review. The existing definitions are base on what was necessary for the conversion of S-52 symbols. Now new symbols have to be developed and the limitations are huge. Just a few ideas.

  • extend the commands of the d attribute for the path element
  • Add rx and ry attributes to the rect element in order to create ovals.
  • make the space attribute of the svg element optional
  • allow the g element
  • and many more The text elements should not be used since text can be converted to pathes. This will make the symbols look identical even if the original font is not available at the target system. Note that this is only the start of the discussion. Definitely the schema is not enough since it cannot describe the format of all attributes (or only by really weird patterns).

Btw. All of the inland ENC symbols in the IHO registry are not compliant (they use the g element)

MikusRL commented 1 year ago

And I thought that one part of the approval process in the GI Registry was to look, in the case of symbols for example, if the symbol submitted is compliant with normatives of the S-100 version it is submitted against. (FYI @JeffWootton )

HolgerBothien commented 1 year ago

Yes, but the problem might be that the schema was only developed for Edition 5 and the symbols are registered before. The profile was already in place but who is able to check a symbol file against a written document with ambiguities. The symbols do not use the schema at all, since it did not exists at the time of creation. I don't know how the registry can be updated to make the content compliant to ed. 5.

MikusRL commented 1 year ago

What I meant is as long as there is appropriate metadata for the symbol that goes with it, then I would not see that as a problem. In your mentioned case, metadata value for all earlier registered symbols could be updated with value "S-100 v.4.0.0 or earlier", and all new registered with the version value they have been created against. And if there would be a need for someone to re-use the symbol, but it would be an incompatible earlier version, then they would know they first need to update the symbols svg for it to be compatible with necessary version. Or, if the versions are not backward compatible, then, yes, make a "copy" of the symbol, give it an updated name, and state in it's metadata, that this symbol is an updated version of the concrete other older symbol. That could be one way to manage that? Then the previous symbol would not be "broken" for older systems, as would be left as is, and there would be new one for the newer systems as a new version, but as long as they look the same, and have it in the metadata that this one is a next version of that other one, then the end user on the end system or display would not even notice that there is a difference between those two symbols.

alvarosanuy commented 1 year ago

Portrayal subWG meeting - 12th January 2023

  1. @HolgerBothien to lead the drafting and submission of a paper to S100WG. People to assist with the task: @DavidGrant-NIWC @rmalyankar @MikusRL

  2. Leave the issue open until a decision is made by the S100WG.

DavidGrant-NIWC commented 1 year ago
rmalyankar commented 1 year ago

SVG Metadata

The 5.0 SVG1 (https://schemas.s100dev.net/schemas/S100/5.0.0/S100PC/20220705/S100SVG1.xsd) has:

<xs:attribute ref="tns:publisher" use="required"/>
<xs:attribute ref="tns:creationDate" use="required"/>
<xs:attribute ref="tns:source" use="required"/>
<xs:attribute ref="tns:format" use="required"/>
<xs:attribute ref="tns:version" use="required"/>

Is there consensus on adding name (mandatory) and exposition (optional) attributes to SVG metadata? Anything else?

SVG format

Previous comments only have various ideas. Can we expect a draft paper from somebody soon, or consensus in this discussion about some revisions?

Ideas upchain and elsewhere:

  1. extend the commands of the d attribute for the path element (how?)
  2. Add rx and ry attributes to the rect element in order to create ovals.
  3. make the space attribute of the svg element optional
  4. allow the g element
  5. allow curve instructions?
  6. allow relative coordinates?
  7. "many more"?
  8. Facilitate drawing of graphed data, e.g. time series
HolgerBothien commented 1 year ago

SVG Metadata

I am not sure if we need these two new attributes. The SVG Schema already defines two elements and <desc> that perfectly match here. But I would rather relax the use of the existing attributes. </p> <ul> <li>source should be optional</li> <li>format should be optional (btw. what format is meant? the format of the source or the format used for this symbol which is described in the <svg> element already</li> <li>version should be optional (again which version is meant?)</li> </ul> <p>I would be open to remove format and version completely. Do the really add value or rather confusion.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/HolgerBothien"><img src="https://avatars.githubusercontent.com/u/88826517?v=4" />HolgerBothien</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <h3>SVG format</h3> <p>I can draft a paper in the week after next week. Most likely I will propose:</p> <ol> <li>extend the list of commands in the d attribute of the <path> element including Bezier Curves, Arc,/Ellipses, and the use of relative coordinates - The reason is that all those commands may be used by common SVG editors like Inkscape.</li> <li>add rx and ry to the rect element</li> <li>make space attribute of svg optional.</li> <li>allow the g element with at least the transform attribute</li> </ol> <p>I would not support things like</p> <ul> <li>animations</li> <li>the text command (good editor can convert the Glyphs to paths which makes the appearance independent from the existence of a font on the target system</li> </ul> <p>What is not clear to me is what is supported for the attributes currently allowed like: class, style, and fill. I appreciate any input. The main goal is to allow the use of common SVG editors but limit on the other hand the implementation costs for those OEMs that interpret the SVG themselves. We should keep it as simple as possible, but not simpler.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/DavidGrant-NIWC"><img src="https://avatars.githubusercontent.com/u/62906211?v=4" />DavidGrant-NIWC</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>This issue relates to the SVG schema. The AreaFill and LineStyle schemas do not currently use the SVG metadata, so any metadata extension to account for those should be discussed in a separate issue. Also, <em>name</em> and <em>description</em> are provided in portrayal_catalogue.xml when the element is cataloged.</p> <p>This issue should be split into two issues, one discussing the SVG metadata, and the other discussing the SVG format (as @HolgerBothien has done above).</p> <h3>SVG Metadata</h3> <p>OEM's shouldn't really care what is included here. It is not intended to be used by the ECDIS; it's strictly for use by the symbol developer. In my mind this metadata should better match the S-100 part 2a metadata to assist in registration and tracking. I do think <em>source</em> has some value for traceability back to the origination of the symbol.</p> <h3>SVG format</h3> <ul> <li>@HolgerBothien list elements 1 through 3 seem reasonable.</li> <li>I don't really see a need for the 'g' element, what is the rationale for adding it?</li> <li>I agree that text and animations should not be added.</li> </ul> <blockquote> <p>What is not clear to me is what is supported for the attributes currently allowed like: class, style, and fill.</p> </blockquote> <p>Recommend provide a table specifying what is / is not supported, e.g., from <a href="https://www.w3.org/TR/SVGTiny12/styling.html">https://www.w3.org/TR/SVGTiny12/styling.html</a></p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/TDYCARHugh"><img src="https://avatars.githubusercontent.com/u/50683133?v=4" />TDYCARHugh</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Re: @rmalyankar Is there consensus on adding name (mandatory) and exposition (optional) attributes to SVG metadata?</p> <p>As Holger suggests, how would these new attributes be different from the existing 'title' and description 'desc' fields?</p> <p>I am in agreement (so far) with Holger's proposals.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/TDYCARHugh"><img src="https://avatars.githubusercontent.com/u/50683133?v=4" />TDYCARHugh</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>The metadata 'format' attribute was meant to have a way to indicate the possibility of S-100 being extended with different SVG profiles.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/HolgerBothien"><img src="https://avatars.githubusercontent.com/u/88826517?v=4" />HolgerBothien</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>@DavidGrant-NIWC : The g element may be used by some editors and can define transformations for all sub elements. It can also be used to reuse complex structures by referencing. But I agree, everything can be achieved without it. Btw: A few hundred symbols in the registry already use the g element which makes them non conforming.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/HolgerBothien"><img src="https://avatars.githubusercontent.com/u/88826517?v=4" />HolgerBothien</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Regarding the path commands please refer to : <a href="https://www.w3.org/TR/SVG/paths.html">https://www.w3.org/TR/SVG/paths.html</a> Means: MoveTo: <strong>M, m</strong> ClosePath: <strong>Z, z</strong> LineTo: <strong>L, l, H, h, V, v</strong> Cubic Bézier: <strong>C, c, S, s</strong> Quadratic Bézier; <strong>Q, q, T, t</strong> Elliptical Arc; <strong>A, a</strong></p> <p>Not supported should be commands defined for SVG 2.0 (Bearing command, Catmull-Rome) Currently only <strong>M</strong>, <strong>L</strong>, and <strong>Z</strong> are supported.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/HolgerBothien"><img src="https://avatars.githubusercontent.com/u/88826517?v=4" />HolgerBothien</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Other topics that should be considered by the profile are:</p> <ul> <li>coordinates</li> <li>units</li> <li>transformation</li> <li>style attributes</li> </ul> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/DavidGrant-NIWC"><img src="https://avatars.githubusercontent.com/u/62906211?v=4" />DavidGrant-NIWC</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <blockquote> <p>Regarding the path commands please refer to : <a href="https://www.w3.org/TR/SVG/paths.html">https://www.w3.org/TR/SVG/paths.html</a> Means: MoveTo: <strong>M, m</strong> ClosePath: <strong>Z, z</strong> LineTo: <strong>L, l, H, h, V, v</strong> Cubic Bézier: <strong>C, c, S, s</strong> Quadratic Bézier; <strong>Q, q, T, t</strong> Elliptical Arc; <strong>A, a</strong></p> <p>Not supported should be commands defined for SVG 2.0 (Bearing command, Catmull-Rome) Currently only <strong>M</strong>, <strong>L</strong>, and <strong>Z</strong> are supported.</p> </blockquote> <p>S-100 uses the SVG Tiny 1.2 profile of SVG, so the appropriate reference is to <a href="https://www.w3.org/TR/SVGTiny12/paths.html">https://www.w3.org/TR/SVGTiny12/paths.html</a></p> <ul> <li>Elliptical Arc is not supported in SVG Tiny 1.2</li> <li>SVG 2.0 commands are not supported</li> </ul> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/DavidGrant-NIWC"><img src="https://avatars.githubusercontent.com/u/62906211?v=4" />DavidGrant-NIWC</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <blockquote> <p>Other topics that should be considered by the profile are:</p> <ul> <li>coordinates</li> <li>units</li> <li>transformation</li> <li>style attributes</li> </ul> </blockquote> <ul> <li>Coordinate systems, Transformations and Units: <a href="https://www.w3.org/TR/SVGTiny12/coords.html">https://www.w3.org/TR/SVGTiny12/coords.html</a> <ul> <li><a href="https://www.w3.org/TR/SVGTiny12/types.html#DataTypeLength">https://www.w3.org/TR/SVGTiny12/types.html#DataTypeLength</a></li> <li>SVG Tiny 1.2 only supports optional units on the <em>width</em> and <em>height</em> attributes on the <em>svg</em> element.</li> </ul></li> </ul> <table> <thead> <tr> <th style="text-align: left;">Units</th> <th style="text-align: center;">Supported</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">in</td> <td style="text-align: center;">?</td> </tr> <tr> <td style="text-align: left;">cm</td> <td style="text-align: center;">?</td> </tr> <tr> <td style="text-align: left;">mm</td> <td style="text-align: center;">Yes</td> </tr> <tr> <td style="text-align: left;">pt</td> <td style="text-align: center;">?</td> </tr> <tr> <td style="text-align: left;">pc</td> <td style="text-align: center;">?</td> </tr> <tr> <td style="text-align: left;">px</td> <td style="text-align: center;">no</td> </tr> <tr> <td style="text-align: left;">%</td> <td style="text-align: center;">no</td> </tr> </tbody> </table> <ul> <li>Attribute and Property Tables: <a href="https://www.w3.org/TR/SVGTiny12/attributeTable.html">https://www.w3.org/TR/SVGTiny12/attributeTable.html</a></li> <li>Basic shapes: <a href="https://www.w3.org/TR/SVGTiny12/shapes.html">https://www.w3.org/TR/SVGTiny12/shapes.html</a></li> </ul> <table> <thead> <tr> <th style="text-align: left;">Shape</th> <th style="text-align: center;">Supported</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">rect</td> <td style="text-align: center;">Yes</td> </tr> <tr> <td style="text-align: left;">circle</td> <td style="text-align: center;">Yes</td> </tr> <tr> <td style="text-align: left;">ellipse</td> <td style="text-align: center;">?</td> </tr> <tr> <td style="text-align: left;">line</td> <td style="text-align: center;">?</td> </tr> <tr> <td style="text-align: left;">polyline</td> <td style="text-align: center;">?</td> </tr> <tr> <td style="text-align: left;">polygon</td> <td style="text-align: center;">?</td> </tr> </tbody> </table> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/HolgerBothien"><img src="https://avatars.githubusercontent.com/u/88826517?v=4" />HolgerBothien</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <blockquote> <blockquote> <p>Regarding the path commands please refer to : <a href="https://www.w3.org/TR/SVG/paths.html">https://www.w3.org/TR/SVG/paths.html</a> Means: MoveTo: <strong>M, m</strong> ClosePath: <strong>Z, z</strong> LineTo: <strong>L, l, H, h, V, v</strong> Cubic Bézier: <strong>C, c, S, s</strong> Quadratic Bézier; <strong>Q, q, T, t</strong> Elliptical Arc; <strong>A, a</strong> Not supported should be commands defined for SVG 2.0 (Bearing command, Catmull-Rome) Currently only <strong>M</strong>, <strong>L</strong>, and <strong>Z</strong> are supported.</p> </blockquote> <p>S-100 uses the SVG Tiny 1.2 profile of SVG, so the appropriate reference is to <a href="https://www.w3.org/TR/SVGTiny12/paths.html">https://www.w3.org/TR/SVGTiny12/paths.html</a></p> <ul> <li>Elliptical Arc is not supported in SVG Tiny 1.2</li> <li>SVG 2.0 commands are not supported</li> </ul> </blockquote> <p>Ok, thank you for clarification. I am happy to remove Elliptical Arc</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/HolgerBothien"><img src="https://avatars.githubusercontent.com/u/88826517?v=4" />HolgerBothien</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p><strong>Units</strong>: I propose to use mm only. <strong>Shapes</strong>: I propose to use use them all. It might be difficult to control third party editors to prevent them from using them though line, polyline, and polygon can be easily replaced be path elements. Implementation overhead would be minimal.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/DavidGrant-NIWC"><img src="https://avatars.githubusercontent.com/u/62906211?v=4" />DavidGrant-NIWC</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <blockquote> <p><strong>Units</strong>: I propose to use mm only.</p> </blockquote> <p>We agree, although converting from units other than <code>'px'</code> and <code>'%'</code> to <code>'mm'</code> is trivial.</p> <blockquote> <p><strong>Shapes</strong>: I propose to use use them all. It might be difficult to control third party editors to prevent them from using them though line, polyline, and polygon can be easily replaced be path elements. Implementation overhead would be minimal.</p> </blockquote> <p>Agree. Note that use of editors other than KHOA's probably requires editing to replace RGB values with color tokens.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/HolgerBothien"><img src="https://avatars.githubusercontent.com/u/88826517?v=4" />HolgerBothien</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>One more thing to consider: styling attributes. Currently the schema only supports one two attributes for this : <em>fill</em> and <em>style</em> By the latter all available style attributes can be used through the back door. We should provide a list of style attributes the should be supported by the OEM renderes. Things like:</p> <ul> <li>fill</li> <li>fill-opacity</li> <li>fill-rule</li> <li>stroke</li> <li>stroke-width</li> <li>stroke-linecap</li> <li>stroke-linejoin</li> <li>stroke-miterlimit</li> <li>stroke-opacity</li> <li>stroke-dasharray</li> <li>stroke-dashoffset</li> </ul> <p>I propose to support all of the above and allow them on the svg elements. Styling via CSS should be limited to colours. The default colours should be implemented in the SVG itself to allow preview with browsers and other viewers without the existance of css files.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/MikusRL"><img src="https://avatars.githubusercontent.com/u/72803214?v=4" />MikusRL</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>@HolgerBothien , would you happen to have an example of a .svg file in-holding the default colors and instructions of portray for the direct viewing in the browser? Could you share it here please? And by adding this to the .svg file directly, would the .svg file still will be in the accordance with the Tiny 1.2 profile? If yes, I think then that this is a brilliant idea. IHO and rest of the S-100 community would benefit from this a lot, by more persons being able to actively contribute. This then also needs to be added as default .svg parts to the IHO Symbol builder.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/HolgerBothien"><img src="https://avatars.githubusercontent.com/u/88826517?v=4" />HolgerBothien</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>I am in the process of setting up a document for the SVG profile that will allow this. I can post here a small example on how it could work: A symbol that can be viewed with or without the aligned CSS. <a href="https://github.com/S-101-Portrayal-subWG/Working-Documents/files/10839694/SVG.zip">SVG.zip</a></p> <p>It will still conform to SVG Tiny and to the S-100 SVG profile When the g element is added. But it would be possible without the g element.</p> <p>I hope to be ready with the document by tomorrow.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/MikusRL"><img src="https://avatars.githubusercontent.com/u/72803214?v=4" />MikusRL</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>I see, so the color in the file is encoded in both - the ECDIS code and the hex code,. and some other "smarts" making it more flexible for development and re-use. I think it is definitely a way to go. It would be a good news also for the Baseline Symbology PT (under the NCWG), which is tasked to create the .svgs for the ENC-to-paper base set of symbols. This development would really benefit the Group task there too.</p> <p>( @Brousseaudan , FYI. )</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/MikusRL"><img src="https://avatars.githubusercontent.com/u/72803214?v=4" />MikusRL</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>@HolgerBothien , and I would suggest from the experience that this comment is very important and useful to be added as well in the display instructions: "!-- Set display= to 'inline' to show viewbox and pivot point or to 'none' to hide them --"</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/HolgerBothien"><img src="https://avatars.githubusercontent.com/u/88826517?v=4" />HolgerBothien</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>One thing that I have learned when doing the new S-100 SVG profile: The style attribute currently allowed by the S-100 profile is not part of the SVG Tiny specification. At least I haven't found it there. In the new profile I will deprecate the use of it but encourage clients of interpreting it for backward compatibility. I am still not ready with the new profile and hope to finish it tomorrow.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/DavidGrant-NIWC"><img src="https://avatars.githubusercontent.com/u/62906211?v=4" />DavidGrant-NIWC</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <blockquote> <p>One thing that I have learned when doing the new S-100 SVG profile: The style attribute currently allowed by the S-100 profile is not part of the SVG Tiny specification. At least I haven't found it there.</p> </blockquote> <p>Good catch - it looks like <code>style</code> is part of SVG, but not part of SVG Tiny 1.2. You probably already saw, but just FYI S-100 9-B-3-2 describes the style properties which are allowed (some are missing though, need to check the values used in the svg element itself such as fill-rule, etc.). Style properties are described in <a href="https://www.w3.org/TR/SVGTiny12/single-page.html#styling-SVGStylingProperties">chapter 6.1 of SVGTiny 1.2</a></p> <p>So I guess we have to update all the symbols from:</p> <pre><code><svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny" xml:space="preserve" style="shape-rendering:geometricPrecision; fill-rule:evenodd;" width="3.8mm" height="4.9mm" viewBox="-1.9 -2.4 3.8 4.8"> ... <path d=" M 0.0,-2.0 L 0.0,2.0" class="sl f0 sCHBLK" style="stroke-width: 0.32;"/> ...</code></pre> <p>to</p> <pre><code><svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny" xml:space="preserve" shape-rendering="geometricPrecision" fill-rule="evenodd" width="3.8mm" height="4.9mm" viewBox="-1.9 -2.4 3.8 4.8"> ... <path d=" M 0.0,-2.0 L 0.0,2.0" class="sl f0 sCHBLK" stroke-width="0.32"/> ...</code></pre> <p>alternatively, we could add classes for the style properties to the CSS files and reference them from class attributes within the SVG file.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/HolgerBothien"><img src="https://avatars.githubusercontent.com/u/88826517?v=4" />HolgerBothien</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>I would prefer to use the presentation attributes in the svg file and limit the class - style-property relation to only three attribute: fill, stroke, and display. Especially the use of properties in CSS files which defines length (stroke-width or stroke-dasharray) are problematic because those values must be interpreted according to the current local user coordinate system. This can be modified by the width, height, viewbox relation at the <svg> element or by any transformation via a transform attribute. That's why I would prefer to use styling properties except the three mentioned above only as presentation attributes in the SVG file. @DavidGrant-NIWC That is inline with your first proposal.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/HolgerBothien"><img src="https://avatars.githubusercontent.com/u/88826517?v=4" />HolgerBothien</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Finally I have prepared a new Appendix 9B (SVG Profile) and will post it here. It might not be the final version but at least there is something to discuss. Unfortunately I won't be in Seoul but available by mail or online. <a href="https://github.com/S-101-Portrayal-subWG/Working-Documents/files/10860947/SVGProfile.docx">SVGProfile.docx</a></p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/HolgerBothien"><img src="https://avatars.githubusercontent.com/u/88826517?v=4" />HolgerBothien</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>I will prepare a new schema that takes the changes into acount.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/DavidGrant-NIWC"><img src="https://avatars.githubusercontent.com/u/62906211?v=4" />DavidGrant-NIWC</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <blockquote> <p>Finally I have prepared a new Appendix 9B (SVG Profile) and will post it here. It might not be the final version but at least there is something to discuss.</p> </blockquote> <p>Really good. Just a few minor comments / edits for your consideration: <a href="https://github.com/S-101-Portrayal-subWG/Working-Documents/files/10863938/SVGProfile.docx">SVGProfile.docx</a></p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/HolgerBothien"><img src="https://avatars.githubusercontent.com/u/88826517?v=4" />HolgerBothien</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>@DavidGrant-NIWC : Thank you, all changes are much appreciated.</p> <p>I agree that the metadata section should be updated, and I have forgotten the metadata element in the table of supported elements. Another thing I have thought of when doing the schema: Must <code><title></code> and <code><desc></code> be mandatory. I would like to make them optional. The name of the symbol used in the lua rules comes from the PC anyway.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/DavidGrant-NIWC"><img src="https://avatars.githubusercontent.com/u/62906211?v=4" />DavidGrant-NIWC</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <blockquote> <p>Another thing I have thought of when doing the schema: Must <title> and <desc> be mandatory. I would like to make them optional. The name of the symbol used in the lua rules comes from the PC anyway.</p> </blockquote> <p>I agree</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/HolgerBothien"><img src="https://avatars.githubusercontent.com/u/88826517?v=4" />HolgerBothien</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Here is a new version of the document with all changes from Dave accepted and a few things changed by myself:</p> <ul> <li>make title and desc optional</li> <li>add the metadata element to the table</li> <li>rewrote the metadata section If this is ok I would forward it to the TSM documents. <a href="https://github.com/S-101-Portrayal-subWG/Working-Documents/files/10873266/SVGProfile_20230302.docx">SVGProfile_20230302.docx</a></li> </ul> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/HolgerBothien"><img src="https://avatars.githubusercontent.com/u/88826517?v=4" />HolgerBothien</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>And here are the new schemas: <a href="https://github.com/S-101-Portrayal-subWG/Working-Documents/files/10873303/SVG.zip">SVG.zip</a></p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/DavidGrant-NIWC"><img src="https://avatars.githubusercontent.com/u/62906211?v=4" />DavidGrant-NIWC</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Looks good. I did see one typo in the intro:</p> <p><code>This appendix describes the subset of SVG elements, attributes, and properties</code><strike>in</strike><code>which may be used within an S-100 compliant SVG document.</code></p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/HolgerBothien"><img src="https://avatars.githubusercontent.com/u/88826517?v=4" />HolgerBothien</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>I have developed an XSLT style sheet that does the conversion from inline styling via style attribute into SVG attributes. It removes also unnecessary stuff from an SVG file. It can be used to</p> <ol> <li>repair the symbols already in the registry</li> <li>make symbols that have been generated by Inkscape conformal to the S-100 SVG profile as I have it proposed.</li> </ol> <p>I have converted all symbols from the registry, since I've got them a few weeks ago for another project. Please find attached here the XSLT, all symbols and the schema. (I did a small modification in the schema to allow empty g elements. Note that the XSLT style sheet requires XSLT 2.0 or later. Note also, that the output rom the XSLT has some strange formatting which can be easily fixed by xmllint or a similar tool (I have used xml starlet).</p> <p><a href="https://github.com/S-101-Portrayal-subWG/Working-Documents/files/10959458/SVG.zip">SVG.zip</a></p> <p><a href="https://github.com/S-101-Portrayal-subWG/Working-Documents/files/10959474/symbols.zip">symbols.zip</a></p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/DavidGrant-NIWC"><img src="https://avatars.githubusercontent.com/u/62906211?v=4" />DavidGrant-NIWC</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>@HolgerBothien can you update the symbols per #124?</p> <ul> <li>I can't use the symbols you provided - the symbols need to be updated in place; some of them have changes which are not reflected in the registry.</li> </ul> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/HolgerBothien"><img src="https://avatars.githubusercontent.com/u/88826517?v=4" />HolgerBothien</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>I can do that if someone provides me with the symbols to convert. A zip archive with all the SVGs to be converted would be great. The conversion is currently based on what I have proposed in the SVG profile and is using the namespace "<a href="http://www.iho.int/SVGMetadata/5.1">http://www.iho.int/SVGMetadata/5.1</a>" for the meta data. I don't know what the outcome of the TSM meeting was and would wait until it is crystal clear what should be used. If something needs to be modified I can do that but I have to know.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/DavidGrant-NIWC"><img src="https://avatars.githubusercontent.com/u/62906211?v=4" />DavidGrant-NIWC</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <blockquote> <p>The conversion is currently based on what I have proposed in the SVG profile and is using the namespace "<a href="http://www.iho.int/SVGMetadata/5.1">http://www.iho.int/SVGMetadata/5.1</a>" for the meta data. I don't know what the outcome of the TSM meeting was and would wait until it is crystal clear what should be used. If something needs to be modified I can do that but I have to know.</p> </blockquote> <p>That makes sense. We'll continue tracking the symbol update action in #124.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/rmalyankar"><img src="https://avatars.githubusercontent.com/u/51188078?v=4" />rmalyankar</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>From TSM9 Decisions/Actions, Agenda item 4.27 (SVG Profile):</p> <blockquote> <p>[Action 9/37] S-100WG chair to invite DG and HB to submit a change proposal regarding SVG profile. Target S-100WG8</p> </blockquote> <p>S-100WG8 is in November 2023.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/alvarosanuy"><img src="https://avatars.githubusercontent.com/u/70189016?v=4" />alvarosanuy</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p><strong>Decisions made at Portrayal subWG meeting on 11/5/23</strong></p> <ul> <li> <p>Note the progress made by Holger and Dave and the decision made at TSM9 to defer the discussion until S100WG8 in November 2023.</p> </li> <li> <p>Wait until the new SVG profile is approved by the S100WG before looking at the best way to update all symbols currently in the GI Registry.</p> </li> <li> <p>[x] <strong>Alvaro</strong> to request the creation of a Task in KHOA's GitLab space to assess the possibility of undertaking a global, 'back end', GI Registry SVG profile conversion and symbol files' replacement . No human interaction/manual registration is preferred.</p> </li> </ul> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/alvarosanuy"><img src="https://avatars.githubusercontent.com/u/70189016?v=4" />alvarosanuy</a> commented <strong> 9 months ago</strong> </div> <div class="markdown-body"> <p><strong>Decisions made at Portrayal subWG meeting on 19/10/23</strong></p> <ul> <li>[ ] <strong>NIWC</strong> - Once new proposed S100 SVG profile and metadata changes are endorsed by S100WG8, proceed and <strong>update all symbols in the PC.</strong></li> </ul> <p>Changes to the symbols in the IHO GI Registry should be bulk changed by the IHO (with KHOA support?) at the earliest opportunity (Ideally before PC 2.0.0 is endorsed by HSSC).</p> </div> </div> <div class="page-bar-simple"> <a href="/S-101-Portrayal-subWG/Working-Documents/103?page=2" class="next">Next</a> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>