XSF Discussion - 2014-03-13


  1. dwd

    http://unlooker.com/dubbing-benny-hill-music-rave-music-inexplicably-hilarious/0/

  2. fippo

    m&m: morning. have you seen ben langfelds request for publication of rayo on standards@?

  3. m&m

    I did, and I need to respond, because I'm not sure I still have those patches /-:

  4. m&m

    oh, he sent hints of where his patches are actually located

  5. fippo

    thanks m&m ;-)

  6. Tobias

    any xslt pro here? :) need to have an incrementing counter in an xsl:template

  7. intosi

    Tobias: position() isn't good enough?

  8. Tobias

    position somehow always gives the same number

  9. Tobias

    for the first <img> tag being matched i want 0, for the next 1 and so on

  10. Tobias

    or starting at 1

  11. intosi

    The main problem is that "variables" are in fact constants. The usual way of fixing it is either using recursion, or walk over the elements with an xsl:for-each

  12. intosi

    position should work for the latter.

  13. Tobias

    the for each would be without a <xsl:template>, right?

  14. m&m

    the for-each can call a template

  15. Tobias

    <xsl:for-each select="img"> <cmd name="includegraphics"><xsl:value-of select="position()" /></cmd> </xsl:for-each>

  16. Tobias

    so this would replace all <img/> with a <cmd name...>0...n</cmd>?

  17. m&m

    I think so, but it's been a long while since I've done XSLT, but that feels right

  18. intosi

    Sorry, wandered off. That should work. My XSLT is a bit rusty as well, though.

  19. Tobias

    element for-each only allowed within a template, variable or param compilation error: file xep2texml.xsl line 408 element value-of element value-of only allowed within a template, variable or param compilation error: file xep2texml.xsl line 407 element for-each xsltParseStylesheetTop: unknown for-each element

  20. Tobias

    probably that's more for when you want to put all <img>s at one place

  21. Tobias

    but i basically want to replace the tag in place

  22. intosi

    But those <img/>s must have a parent element.

  23. intosi

    Just run a template on that element.

  24. Tobias

    usually in a <p>

  25. Tobias

    yes

  26. Tobias

    however i need that counter being global

  27. m&m

    you could also select the count of <img/> elements that precede the current one

  28. intosi

    Sure.

  29. Tobias

    m&m, that sounds useful, how?

  30. Tobias

    it would essentially be counter i'm looking for

  31. m&m

    IIRC, count is a function, and preceding:<path> is the selector within the count()

  32. m&m

    but it's been a long time

  33. Tobias

    thx

  34. m&m grumbles about authors not updating their <revision> lists

  35. intosi

    http://stackoverflow.com/questions/11037979/xpath-1-0-finding-count-of-nodes-before-a-specified-node

  36. m&m

    stackoverflow to the rescue

  37. Tobias

    yes..works ....thanks :)

  38. Tobias

    soon we'll have images in our PDFs :)

  39. m&m

    nice

  40. Tobias

    https://dl.dropboxusercontent.com/u/14672346/xmpp/extensions/xep-0324.pdf not perfect yet, but a good start i think

  41. simon

    Nice sequence diagrams!

  42. Tobias

    well...at least now we *can* use something else than ascii art :D

  43. fippo

    16:41 < xmpp:xsf@muc.xmpp.org/Tobias> soon we'll have images in our PDFs :)

  44. fippo

    errr...

  45. Tobias

    errr...?

  46. fippo

    nice!

  47. Tobias

    well..it's pushed...as soon as someone hits a rebuild of all XEPs, the images should be included

  48. m&m

    thanks Tobias

  49. m&m

    I'm a little hesitant to run all.sh at the moment

  50. m&m

    maybe we can do that this weekend

  51. m&m

    or someone else with rights can do it (-:

  52. Tobias

    xsf@athena:~/xmpp-hg/extensions$ ./gen.py -a ./gen.py:79: Warning: 'with' will become a reserved keyword in Python 2.6 File "./gen.py", line 79 with open(output_dir + '/' + 'inlineimage-' + str(no) + '.' + file_ext, 'wb') as f: ^ SyntaxError: invalid syntax

  53. Tobias

    what's wrong with thatß

  54. Tobias

    what's wrong with that?

  55. Tobias

    worked on osx with Python 2.7.5

  56. Tobias

    ah..athena has Python 2.5.2

  57. fippo

    i think the whole "with" is pretty new

  58. stpeter

    Tobias: is "?" close to "ß" on your keyboard?

  59. Tobias

    stpeter, same key on german keyboard :) just a shift between them :)

  60. Tobias

    fippo, so just write f = open(...) ?

  61. intosi

    Tobias: from future import with_statement?

  62. Tobias

    yeah..need to add a latex package too..since it's also not present on athena

  63. intosi

    Well, from __future__ import with_statement, obviously

  64. Tobias

    cp -r deps /tmp/xepbuilder/ <--- how do i write this so it copies files from deps to xepbuilder folder, not creating the deps folder in the xepbuilder folder?

  65. intosi

    cp -r deps/* /tmp/xepbuilder/ ?

  66. Tobias

    wouldn't the * require a shell?

  67. intosi

    Or (cd debs; cp -r . /tmp/xepbuilder) if you're worried about the number of files.

  68. intosi

    Both require a shell.

  69. intosi

    Are you running this from a shell script?

  70. dwd

    Oh, Python?

  71. Tobias

    commands.getstatusoutput

  72. Tobias

    python

  73. intosi

    http://docs.python.org/2/library/shutil.html

  74. intosi

    shutil.copytree might be of interest.

  75. Tobias

    i'll try the * thing

  76. intosi

    getstatusoutput actually spawns a shell, IIRC

  77. Tobias

    so..rebuilding xeps

  78. fippo

    https://twitter.com/lisamarienyc/status/444162578642513920 -- this looks like the next xmpp summit should be near fluentconf

  79. ralphm

    heh

  80. ralphm

    there is a good supply of bacon on Tenerife, too

  81. Tobias

    fippo, better than http://i.imgur.com/TuBI68M.jpg :)

  82. dwd

    I can't decide if that sounds awesome or awful.

  83. Zash

    I can't decide if I should run to the store and see if they have any ... or walk.

  84. m&m

    eek

  85. m&m

    that is not bacon

  86. Neustradamus

    I have found this tweet: https://twitter.com/betamax65/status/441124379318321152/photo/1

  87. fippo

    neustradamus: "June 25, 2013: We have temporarily disabled account registration"

  88. fippo

    but telling the iteam might help

  89. Kev

    iteam aren't responsible for jabber.org

  90. Neustradamus

    yes I know this, maybe a person can reply ;)

  91. Neustradamus

    Tobias: https://twitter.com/Neustradamus/status/422532965583687680 some months ago ;)

  92. Tobias

    yeah..wonder if they are cool enough to use twitter as support input

  93. fippo

    neustradamus: simon and I were in contact with some marketing guy via the FSFE -- not much of a response

  94. fippo

    let's break it for them, then watch them struggle to fix it.

  95. Zash

    Break all the things!