agiorguk / gemini

Resources relating to the UK Gemini metadata profile
5 stars 3 forks source link

Removal of blank lines from xml encoding examples #57

Closed nmtoken closed 4 days ago

nmtoken commented 3 years ago

Looking at the guidance (https://www.agi.org.uk/gemini/40-gemini/1048-uk-gemini-encoding-guidance/) you can see that the code examples have different fonts/styles, for example Figure 23 is using 17px, Consolas whereas Figure 22b is using 23px font.

Looking at source there is a difference in the HTML, but not sure how this has come about.

<div>
<h5><strong>Figure 22b - INSPIRE no limitations on access; constraint on use</strong></h5>
<pre>&lt;!-- INSPIRE C.17; GEMINI 25 Limitations on public access --&gt; <br />
&lt;gmd:resourceConstraints&gt;<br />
 &lt;gmd:MD_LegalConstraints&gt;<br />
  &lt;gmd:accessConstraints&gt;<br />
   &lt;gmd:MD_RestrictionCode<br />
codeList="<code>https://schemas.isotc211.org/schemas/19139/resources/gmxCodelists.xml</code>#MD_RestrictionCode"<br />
codeListValue="otherRestrictions"&gt;otherRestrictions&lt;/gmd:MD_RestrictionCode&gt;<br />
&lt;/gmd:accessConstraints&gt;<br />
&lt;gmd:otherConstraints&gt;<br />
&lt;gmx:Anchor xlink:href="http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/noLimitations"&gt;no limitations&lt;/gmx:Anchor&gt;<br />
&lt;/gmd:otherConstraints&gt;<br />
&lt;/gmd:MD_LegalConstraints&gt;<br />
&lt;/gmd:resourceConstraints&gt;<br />
<br />
&lt;!-- INSPIRE C.18; GEMINI 26 use constraints --&gt; <br />
&lt;gmd:resourceConstraints&gt;<br />
&lt;gmd:MD_LegalConstraints&gt; &lt;!-- change existing example here, was MD_Constraints --&gt;<br />
&lt;gmd:useConstraints&gt;<br />
&lt;gmd:MD_RestrictionCode<br />
codeList="<code>https://schemas.isotc211.org/schemas/19139/resources/gmxCodelists.xml</code>#MD_RestrictionCode"<br />
codeListValue="otherRestrictions"&gt;otherRestrictions&lt;/gmd:MD_RestrictionCode&gt;<br />
&lt;/gmd:useConstraints&gt;<br />
&lt;gmd:otherConstraints&gt;<br />
&lt;gco:CharacterString&gt;Not to be used for navigation&lt;/gco:CharacterString&gt;<br />
&lt;/gmd:otherConstraints&gt;<br />
&lt;/gmd:MD_LegalConstraints&gt;<br />
&lt;/gmd:resourceConstraints&gt;</pre>
</div>

v.s.

<div>
<h5><strong>Figure 23 - Metadata for datasets using the gmd:MD_DataIdentification type </strong></h5>
<p><code>&lt;gmd:MD_Metadata&gt;</code><br />
<code>  ...</code><br />
<code>  &lt;gmd:hierarchyLevel&gt;</code><br />
<code>    &lt;gmd:MD_ScopeCode codeList="</code><code>https://schemas.isotc211.org/schemas/19139/resources/gmxCodelists.xml</code><code>#MD_ScopeCode" codeListValue="dataset"&gt;dataset&lt;/gmd:MD_ScopeCode&gt;</code><br />
<code>  &lt;/gmd:hierarchyLevel&gt;</code><br />
<code>  ...</code><br />
<code>  &lt;gmd:identificationInfo&gt;</code><br />
<code>    &lt;gmd:MD_DataIdentification&gt;</code><br />
<code>      ...</code><br />
<code>    &lt;/gmd:MD_DataIdentification&gt;</code><br />
<code>  &lt;/gmd:identificationInfo&gt;</code><br />
<code>  ...</code><br />
<code>&lt;/gmd:MD_Metadata&gt;</code></p>

</div>

Can we have just one style (preferably the smaller font)

PeterParslow commented 3 years ago

2021-07-01: Change them all to the smaller font, single spaced. If possible, suppress the box that appears around each line.

PeterParslow commented 2 years ago

Set them all to use

<code>
  <pre>
  </pre>
</code>

With <style>pre {line-height:1; tab-size:2}</style> (accepting that Firefox doesn't recognize tab-size - so will default to 8 character width tab stops).

Also delete the <br> from inside <pre> sections, that had been giving double line spacing in Figure 21. And switch from multiple   characters to tabs inside the pre.

I'll also fix the duplication of the text & figures from "Figure 2" to the end of that section.

PeterParslow commented 2 years ago

Included obvious work around for lack of Firefox support - extend the style string with -moz-tab-size:2

PeterParslow commented 2 years ago

having the 'code' inside the 'pre' seems a bit better. And needed to be careful of any white space inside either....

Turns out this page also suffered from #2, so fixed those links as well.

Reduced separation between lines in the 'contents' at the start (replaced HTML p with br/) & introduced the 'spacer' needed above each link target to cope with AGI's new 'fat banner': .spacer{padding-bottom:80px}

Also remove the totally incorrect rel="alternate" attribute from these 'contents' hyperlinks

PeterParslow commented 2 years ago

I also now have a "clean" HTML version, which may suit them (& us in future) better.

PeterParslow commented 2 years ago

I think it shouldn't be closed until it is live

PeterParslow commented 9 months ago

As at October 2023, after migration to publishing by GitHub / Ascii Doc, the examples are all now consistently styled. The pull request simply removes a number of blank lines within quite a few examples to reduce the white space in this document (my view: the XML lines are quite spread out!).