Menu

Errores when executed ! help

Anonymous
2012-07-11
2012-09-04
  • Anonymous

    Anonymous - 2012-07-11

    Hi everybody,

    I do need some help with this code please... what's wrong with it?

    http://pastebin.com/1kC1yvKE

    thanks in advance

     
  • Selvin Fehric

    Selvin Fehric - 2012-07-11

    Maybe the problem is because you didn't define type of xq-param. So find this:

    <xq-param name="doc">

    <html-to-xml>

    <http url="${url}"/>

    </html-to-xml>

    </xq-param>

    and replace with:

    <xq-param name="doc" type="node()">

    <html-to-xml>

    <http url="${url}"/>

    </html-to-xml>

    </xq-param>

     
  • Anonymous

    Anonymous - 2012-07-11

    Thanks for your answer...

    I made the change you asked, but still having the same error :(

     
  • Anonymous

    Anonymous - 2012-07-11

    Yay, I fixed it finally by correcting to this: {data($nom)}...

    However, how to make a loop to put every name in a tag <pers>NAME</pers> ?

     
  • Anonymous

    Anonymous - 2012-07-11

    Well, I wasted my time trying to realise it using the <loop></loop>...

    It's easier to do it with xquery: for $row in $doc//tbody/tr

    But still curious about how to do it using <loop> ^^ I'll check later to see
    the answer :)

     
  • Selvin Fehric

    Selvin Fehric - 2012-07-11

    You changed pastebin and I cannot look the link that was in previous paste. So
    I don't know how data is structured.

    Loop you can use to iterate through list, and depending on structure of data
    you can create that list, but probably better way is using xquery that you
    already did.

     

Log in to post a comment.