Template talk:XMLElement

Latest comment: 6 years ago by SMcCandlish in topic Whitespace in HTML element article

Invalid markup

edit

If this is really intended for an limited to uses in lists, it need to include the <dt> markup. Its present use in article like HTML element is resulting in bogus list markup all over the place, because entries start with this tag, then are followed by element definitions starting with : (i.e., the <dd> element), without a preceding ; (<dt>) and without a <dl>...</dl> context. This will also auto-boldface the tag names, and we can probably then remove the excessive font sizing.  — SMcCandlish ¢ 😼  19:13, 26 July 2018 (UTC)Reply

Fixing this will be more complicated; see "Whitespace in HTML element article", below.  — SMcCandlish ¢ 😼  03:42, 27 July 2018 (UTC)Reply

Colorization

edit

Why is this outputting green text? There seems to be no cause or use for this.  — SMcCandlish ¢ 😼  19:14, 26 July 2018 (UTC)Reply

Whitespace in HTML element article

edit
  Moved from User talk:SMcCandlish

If you haven't noticed yet, please see this edit and adjust the rest of the article as necessary (since you're already copyediting the whole thing). At first I thought it was Template:XMLElement that was causing the problem (extra whitespace), but it seems to be the use of the definition-term markup ;. That's unfortunate. I don't know if you can fix the problem in a way that allows semicolon markup to be used… (No need to ping me.) - dcljr (talk) 03:17, 27 July 2018 (UTC)Reply

@Dcljr: I raised a related issue here on the template's talk page, above. It turns out I'm pretty much the WP expert on dealing with troublesome description (definition, association) lists. I wrote MOS:GLOSSARY and all the template-structured glossary templates. This probably can be beaten into shape, to produce an actually-valid <dl> list, without mangled whitespace, but it's going to be some work. For one thing, the "definitions" under the term will have to be wrapped in an explicit <dd>...</dd> and the "terms" provided by {{XMLElement}} will have to be wrapped in a real <dt>...</dt>. The desired results are literally impossible with ; and : markup (they are not simply aliases of the HTML elements, but are parsed and turned into them on the fly, following an extremely narrow and brittle algorithm, which cannot handle line breaks, block elements, etc., etc.).

The short answer is that {{XMLElement}} needs to be basically a variant of {{Term}}, and we need an equivalent of {{Defn}} (or maybe just a template alias of it) for the descriptive material that comes after {{XMLElement}}, plus a <dl>...</dl> wrapper (probably just an template redirect for {{Glossary}} and {{Glossary end}}. If you're in a "hell, I can do that!" frame of mind, have it. Otherwise I'll try to add it to my to-do list. The hard part is going to be beating on the template we already have to work more like {{Term}}. It would be a good opportunity to do some "de-annoyingness" changes like reducing the excessive font size and the pointless, confusing green colorization.
 — SMcCandlish ¢ 😼  03:42, 27 July 2018 (UTC)Reply

That page needs a WP:LISTGAP fixing, so you should put the semi-colon back and smush them together. That might fix the whitespace problem. --Izno (talk) 03:27, 27 July 2018 (UTC)Reply
@Izno: Yeah, the listgaps problem is one issue, but a) only a single entry at the page had ; markup, and b) using MOS:GLOSSARY#Template-structured glossary templates will make make the listgaps problem just disappear. PS: Another mandatory fix is moving the anchors in front of the "terms" to be inside them. You can't insert an element like <span> between <dl>, <dt>, and <dd> elements without breaking the list.  — SMcCandlish ¢ 😼  12:17, 27 July 2018 (UTC)Reply