guidelines icon indicating copy to clipboard operation
guidelines copied to clipboard

Invalid html in guidelines

Open rettinghaus opened this issue 6 years ago • 12 comments

The Declaration fields in the guidelines, that present the ODD snippet, are invalid, because <div> is not allowed within <code>.

Example: http://music-encoding.org/guidelines/dev/data-types/data.uneumename.html

rettinghaus avatar Jul 07 '18 09:07 rettinghaus

Where did you find this information that <div> is not allowed within <code>? By definition, every html element should be allowed inside <code>?

musicEnfanthen avatar Nov 06 '18 21:11 musicEnfanthen

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code

'Phrasing content' are the only allowed tags within <code>. If you want to embed other tags you have to character-encode them, e.g., &lt;div&gt;

ahankinson avatar Nov 06 '18 21:11 ahankinson

I see. It's not allowed as genuine html tag.

If I understand it right, the divs and spans in the Declaration part are used for styling purposes (indentation, coloring)? How is it generated? Automatically?

musicEnfanthen avatar Nov 07 '18 08:11 musicEnfanthen

All that is generated automatically on commit. However, the code in there is quite old, and has been adjusted several times to different needs (it's been generating the starting point for our Guidelines PDFs in the past, amongst other things). There have been all kinds of issues in the past, and given that I've essentially build a similar thing last week twice (the only hard part is resolving the various classes), I'm inclined to completely replace the XSLT with something more specific, including better documentation. This would address not only #47, but also #46, #59 and #35. With some assistance (probably by @ahankinson) it could also address (or at least prepare for) #28. I'm happy to do that, but won't be able before middle of next week.

kepper avatar Nov 07 '18 08:11 kepper

Could we use LibMEI and have a guidelines output for it?

lpugin avatar Nov 07 '18 08:11 lpugin

Given that the libmei processor is essentially just a bunch of xpath queries in Python, I don't think there is much advantage to that over XSLT.

ahankinson avatar Nov 07 '18 09:11 ahankinson

just a brief update – I'm working on this (including #46, #59, #35 and potentially #28), and hope to have something ready for review soon. No need for someone else to pick these up

kepper avatar Nov 18 '18 11:11 kepper

HTML errors/warnings

  • still div within code
  • div does not allow xml:space="preserve"
  • script may omit type attribute.

rettinghaus avatar Dec 05 '18 12:12 rettinghaus

that's the code I kept ;-)

Am 05.12.2018 um 13:03 schrieb Klaus Rettinghaus [email protected]:

HTML errors/warnings

• still div within code • div does not allow xml:space="preserve" • script may omit type attribute. — You are receiving this because you were assigned. Reply to this email directly, view it on GitHub, or mute the thread.

kepper avatar Dec 05 '18 12:12 kepper

Over two years later I thought it would be a good time to test again. Same as before with on severe new one:

  • Duplicate ID tipue_search_input.

See: https://validator.w3.org/nu/?doc=https%3A%2F%2Fmusic-encoding.org%2Fguidelines%2Fv4%2Felements%2Fbarline.html

rettinghaus avatar Mar 25 '21 11:03 rettinghaus

Is this still an issue @rettinghaus ?

musicEnfanthen avatar Apr 27 '22 17:04 musicEnfanthen

My comment above has lost none of its relevance.

rettinghaus avatar Apr 28 '22 07:04 rettinghaus