/srv/irclogs.ubuntu.com/2013/11/02/#ubuntu-doc.txt

littlegirlHey there, shaunm, there's a bug report that looks like it might want to have you on it. (:16:13
shaunmlittlegirl: link?16:56
littlegirlshaunm: https://bugs.launchpad.net/ubuntu-docs/+bug/123270816:57
ubot2Launchpad bug 1232708 in Ubuntu Documentation "Some GNOME only help showing up in Unity help (13.10)" [Undecided,Confirmed]16:57
littlegirlshaunm: I've been beating my head on this one. I've tried every possible way I can think of to do conditionals on it and get it to work, but it either displays nothing or displays the wrong text (I use KDE and I see the Unity text when I see any text at all during my tests). It's a stumper. (:16:57
littlegirlshaunm: I'm not sure if it's mentioned in that report, but the file you want to edit is color-assignprofiles.page and the file that displays it is color.page.16:59
shaunmlittlegirl: so I did notice when testing something else that universal-access-menu.png and view-fullscreen-16.png are missing17:01
littlegirlshaunm: Oh! In that document?17:03
shaunmyes, they're both referenced from pages, and not inside conditionals17:04
littlegirlOuch, that needs to be added to that bug or a new one needs to be made. I'll make a note of it right now and look into it, and if there's no bug and I can't fix it right away, I'll write it up as a bug. (:17:04
shaunmit is noted in that bug17:05
shaunmcomments on that bug seem to mention a lot of issues. not sure what the root issue is17:05
littlegirlAh, okay. Well, the one I was working on that would interest you is the conditional inside the <info> tag. I can't get it to behave properly no matter how I code it (whether I do it inside the <desc> tag or outside of it or whether I toss some of the code outside of the <info> tag entirely.17:09
shaunm"The if:choose element can occur in any general block context"17:09
shaunmhttp://projectmallard.org/if/1.0/if_choose17:09
littlegirlYep, and I'm not sure if <info> qualifies as a block or not. (:17:09
shaunmit does not17:09
shaunma block context is somewhere you could put a paragraph17:09
littlegirlAh, okay, so is there a way to do a conditional inside an <info> tag?17:09
shaunmnot at this time17:10
littlegirlYeah, that's what I was starting to figure, and since <info> is invisible, it can't hold a paragraph.17:10
littlegirlshaunm: Could it be hacked by doing the conditional outside of the <info> tag entirely making the conditional point to two <info> tags, one of which gets chosen if the condition is satisfied?17:10
littlegirlI know that would be a sloppy hack, but it would get the job done if it's allowed. (:17:11
shaunmthat won't work either17:15
shaunmI'm afraid there's just currently no way to do what you're trying to do17:15
shaunmdo you actually use the same set of page files when users are running under gnome?17:15
littlegirlI think so. I didn't write the page, and I'd have to study it thoroughly to see what can be done. I'm sure it can just be rewritten to tell the user what would have been automated by the conditional. I'll take a good look at it and see if I can at least sort that part out. Then I'll go after that bug and see if I can't get whoever put all the sloppy additions into it into separate bug reports. (:17:17
shaunmit would probably help to start using version attributes and strict validation in yelp-check17:23
shaunmunfortunately, there are some road blocks to doing that17:23
shaunmI've solved those road blocks, but you won't see the solution until my patch is accepted in libxml2 and a new version is packaged :(17:24
shaunmyou can always still use the version attribute without strict validation to get better validation of your conditionals. you just won't have anything tell you when you forgot the version attribute17:25
littlegirlIt's currently pretty common to use the command (or a variant of the command) in the check_validation.sh file, which uses xmllint. Nobody on the doc team has ever suggested using yelp-check to validate the files. I tried it in the Ubuntu docs the other day and there are some issues that will need attention, and as soon as I get another issue sorted out I'll go after them with yelp-check. (:17:25
littlegirlDoes that mean in your new version (which sounds exciting!) there will be a way for those conditionals to happen?17:26
littlegirlOr just that there will be a way to find out that a bad conditional was written?17:26
shaunmyou'll just know when the conditionals were written wrong17:28
shaunmfor those sorts of conditionals to work, we'll need a new version of conditionals on projectmallard.org17:28
shaunmwhich can happen17:28
littlegirlCool. No hurry, though. I love your work, and would never want to do anything to make you frustrated with it. (:17:29
shaunmfor validation, the core mallard schema is intentionally very forgiving whenever it sees anything outside of the normal namespace. so when you use an if:when element just about anywhere, the schema basically says "I don't know what this is, so I'll just assume it's right"17:29
shaunmthat's the schema that's used by yelp-check if you don't use a version attribute, and almost certainly what your validation script uses17:30
littlegirlYep. All of those just get quietly ignored. At least all the variants I tried when I was doing if:choose, if:when, if: test, etc., etc., etc. in an attempt to get it to do it. I finally gave up and hunted you down. (:17:31
shaunmbut you can set the version attribute on the page element to tell the validator to load in schema plug-ins. if you load the plug-in for conditionals, then when the schema sees if:when, it does know what it is, and it actually checks if it's correct17:31
littlegirlI'm not that advanced in the use of Mallard yet to fully understand that, but I'll do my best to learn those. I'm still digging through all the documentation I can find on Mallard and writing up my own personal reference, and I'm not up to plug-ins yet. (:17:33
shaunmhere's a good example: yelp-check validate color-assignprofiles.page17:33
shaunmthat passes, even though the conditionals are wrong17:34
shaunmedit that file and put the attribute version="1.0 if/1.0" on the page element17:34
shaunmre-run the command. witness the glory of validation errors17:34
littlegirlInteresting. yelp-check validate *.page doesn't turn up any issues, either.17:35
shaunmthat's good. that means that everything that's in the normal namespace is correct17:36
shaunmbut it's not checking anything in if/1.0 or ui/1.0 or experimental or experimental/ui17:36
littlegirlOoooh, then I get: color-assignprofilestwo.page:5: element page: Relax-NG validity error : Expecting element title, got info17:37
littlegirlcolor-assignprofilestwo.page:5: element page: Relax-NG validity error : Element page failed to validate content17:37
littlegirlcolor-assignprofilestwo.page fails to validate17:37
littlegirlOh, I forgot to mention that I created a color-assignprofilestwo.page so I could leave the original one alone, and the two page is the one I put the version attribute into. (:17:37
littlegirlSo if I add that version attribute to all the pages they can be tested with yelp-check from now on?17:38
shaunmthey'll be tested much more strictly with yelp-check, yes17:39
shaunmthere's no need to do it on pages that don't use conditionals17:39
shaunmthough it doesn't hurt17:39
shaunmfiles-copy.page uses the ui extension, so you could use version="1.0 ui/1.0" there17:40
shaunmor even version="1.0 if/1.0 ui/1.0"17:40
littlegirlThese are the ones that are currently used, with line 7 being the one in the check_validation.sh file, but I prefer the last one: http://paste.ubuntu.com/6348233/17:40
shaunmoh, one caveat: unless you've installed local copies of the schema and done black magic with xml catalog files, yelp-check will hit the internet to put together the schema for validation17:41
littlegirlIt slips right past all of those, though.17:41
littlegirlThat's okay. This is for the Ubuntu docs, and it should do that so that it's always up-to-date. On my local documentation, in which I'm converting all my personal documents to Mallard, I'll stick with xmllint.17:42
shaunmthere is a package you can install that gives you a local copy of the 1.0 schema and does the xml catalog black magic for you. but it only contains finalized specs, and conditionals isn't finalized yet17:43
shaunmand I don't know if it's packaged for ubuntu17:43
shaunmwe should finalize conditionals soon17:43
littlegirlIt is, but I didn't install it.17:44
littlegirlWill  version="1.0 if/1.0 ui/1.0" cover all eventualities and be a blanket attribute I can just add to all the docs to make it possible to yelp-check them all?17:44
shaunmit covers everything ubuntu is using now *except* experimental features and embedded ITS17:45
shaunmthere will never be schemas for experimental features, and there's not currently a mallard schema plug-in for ITS17:45
littlegirlI'm kind of surprised Ubuntu uses experimental features. That's not usually the Ubuntu way. (:17:45
shaunmgnome does too17:46
littlegirlMaybe that's why, then.17:46
shaunmbut I kind of need gnome to use them, or else they won't get tested. and the whole point of experimental features is to give them some real-world testing before they get put in a formal specification and I have to support them forever and ever17:47
littlegirlTrue.17:47
littlegirlSo the 1.0 in that version attribute will coincide with the 1.0 in xmlns="http://projectmallard.org/1.0/" right? So if the Mallard version changes, the version attribute should follow suit, right?17:48
littlegirlI'm testing the heck out of links right now. (:17:48
shaunmif the Mallard version changes, you'd change the version attribute, but not the xmlns17:49
shaunmunless it changes to a backwards-incompatible 2.0, which I have no plans on any time soon17:49
littlegirlSo you just leave the xmlns at 1.0?17:50
shaunmyeah, I probably should have named the namespaces just 1 or even 1.x17:50
shaunmif you change namespaces, you basically have to rewrite all the tools17:51
littlegirlThere are all kinds of philosophical discussions out on the internet on how to number software. I think it's six of one, half a dozen of the other when it comes to which way is best. (:17:51
shaunmI followed soname naming conventions, which was probably a mistake because only C programmers understand it17:52
littlegirlFor my personal uses, I'll use it "out of the box" rather than bolting anything onto it. For Ubuntu, hopefully there are others who know how to do the fancy stuff so that can be updated properly. I've already seen some neat stuff (like mouse-over actions) that I don't yet know how to do, let alone maintain. (:17:52
moewe11neither chrome nor firefox let me edit the following wiki entry21:15
moewe11https://help.ubuntu.com/community/Howto%3A%20Custom%20keyboard%20layout%20definitions21:15
moewe11All I get is: "The address wasn't understood". Seems to be the colon in the URL which throws off the browsers21:15

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!