Template talk:Xml
Make the "include" just ONE LEVEL deep
This template gives the category Category:Raw XML files to the XML files (for ex.: Baghlah-AftCrowsNest.xml), which is good... But it also gives that category to the parent files (for ex.: Baghlah) of those XML files, which is bad... How do we stop this, please? I tried encoding a "no include" into the template, using the special HTML code for the less-than and greater-than symbols, but that didn't work... -- Franklincain (t/c) 09:34, 11 June 2014 (PDT)
- Uh. The category's being added to the Baghlah article because the template is being called in the Baghlah article. Not because it's a parent of anything, because it's not actually a parent of the XML file's article in any sense. --Belthazar451 13:59, 11 June 2014 (PDT)
- Then we need to make some change, so that the actual XML files will continue to have the category, but the non-XML files (i.e. the actual articles referencing those XML files) will not get the category. (FWIW, both page types -- XML files and parent articles -- are using this same template, for now.) The first option I think of would be to create a second template, without the category inclusion, for the parent articles. Thoughts? -- Franklincain (t/c) 14:28, 11 June 2014 (PDT)
- That was my thought, too, though it seems a bit complicated (for newer editors). But heck, I'm the only one that's done anything with XML in a few years, and I can handle learning a thing or two. After looking over the actual layout, though, it seems as though the easier way would be to simply tag the individual articles (e.g. Baghlah-AftCrowsNest.xml) with the Category:Raw XML files tag directly, and take it out of the templates. There's actually some revision that needs to be done on most of those pages anyways (specifically, removing the self-referential link). Jlh0605 14:36, 11 June 2014 (PDT)
- I agree with you. Putting the category declaration directly inside the actual XML files, along with removing it from the template, would be the better option, I'd think. If you want to do it, I'd say go ahead. -- Franklincain (t/c) 16:12, 11 June 2014 (PDT)
Necessary argument restored
This edit removed the argument "&action=raw" which was necessary for the proper operation of the link. The whole idea is to download the raw file so that you can press "File->Save as..." and save an XML file. Without the argument, it just flipped back to the YPPedia page, for me at least. On Chrome on Kubuntu Linux. Chupchup 20:57, 11 June 2014 (PDT)
- I assumed that having users "save as" XML wasn't the desired behavior, for three reasons: 1) The "Raw XML" has parts that aren't actually XML (wiki markup, for the most part). The "&action=raw" puts those in the XML file, thus making it an invalid XML file. 2) There are no instructions - if a user wanted to see the Baghlah Crow's nest XML, they click on the link, then they have a weird file download that they may or may not have an idea what to do with. If they see the wiki page with instructions, though, it may work better. 3) Many people are (rightly) wary of downloading files - if they copy/paste the text themselves, they can be assured there's nothing harmful in it.
- Anyways, those are my reasons. I should have asked consensus first, I realize that now, but I was going with the "if you see something, fix it!" montra. I'll refrain from editing the XML-related pages until there is consensus. :) Jlh0605 10:11, 12 June 2014 (PDT)
- I think the right solution for this would be to create container files. That is, remove all extraneous markup from the .xml file and then transclude it to e.g. Sloop-CrowsNest.container which would contain instructions and a link to download it raw, and frame it in the appropriate markup such as <pre> and Wiki templates and and so forth. Chupchup 10:30, 12 June 2014 (PDT)
- Sure, that would fix the first problem, but not the second or third. If you think that's worth it, though, go for it, and I'll support it in the future. I just fear that those "container" files would be dead pages; who would link to them (other than the category page, if even that?) I eventually plan to add the XML for all ships (including LE), so having a universal format first would be nice. Jlh0605 10:52, 12 June 2014 (PDT)
- Problem #2 would be solved because we wouldn't put a "Download raw XML" link in the Baghlah article anymore, we would link to the container, which would include instructions and have a raw download link. Unless you think a two-step process is too difficult for someone trying to collect them all? Problem #3 isn't a problem, at least for me in Chrome, where it does not prompt me to download, but it just displays it in the browser window, where I would have to select "Save page as..." in order to save an XML file. Chupchup 11:18, 12 June 2014 (PDT)
- Fair points, I think we should move ahead with your proposal, unless someone else has a dissenting opinion. Jlh0605 12:29, 12 June 2014 (PDT)
- All interested parties are welcome to make edits in my sandbox area, where I have created User:Chupchup/Sandbox/Baghlah-Cabin.container and support templates. Chupchup 13:45, 12 June 2014 (PDT)
- Fair points, I think we should move ahead with your proposal, unless someone else has a dissenting opinion. Jlh0605 12:29, 12 June 2014 (PDT)
- Problem #2 would be solved because we wouldn't put a "Download raw XML" link in the Baghlah article anymore, we would link to the container, which would include instructions and have a raw download link. Unless you think a two-step process is too difficult for someone trying to collect them all? Problem #3 isn't a problem, at least for me in Chrome, where it does not prompt me to download, but it just displays it in the browser window, where I would have to select "Save page as..." in order to save an XML file. Chupchup 11:18, 12 June 2014 (PDT)
- Sure, that would fix the first problem, but not the second or third. If you think that's worth it, though, go for it, and I'll support it in the future. I just fear that those "container" files would be dead pages; who would link to them (other than the category page, if even that?) I eventually plan to add the XML for all ships (including LE), so having a universal format first would be nice. Jlh0605 10:52, 12 June 2014 (PDT)
- I think the right solution for this would be to create container files. That is, remove all extraneous markup from the .xml file and then transclude it to e.g. Sloop-CrowsNest.container which would contain instructions and a link to download it raw, and frame it in the appropriate markup such as <pre> and Wiki templates and and so forth. Chupchup 10:30, 12 June 2014 (PDT)