Hi Mark,

Fortunately I don't think it's not a bug.

When I look at the source html that is being generated you should actually see that the first server row in the table looks like:

<tr>
        <td>server</td>
        <td>
                <server xmlns="xdmp:http">Jetty(6.1.7)</server>
        </td>
</tr>

Usually browsers treat elements that it doesn't recognize as block level elements and just display the contents of the element (which is probably what's happening for the code, message and content-type elements), for some reason FireFox (and maybe other browsers) aren't doing this for <server/> elements. But that's ok, all you have to do is change line 27 of your sample file to:

<tr><td>server</td><td>{ string($i//resp:server) }</td></tr>

and you'll see it showing up. You should probably do the same thing for lines 23 through 26 as well.

Hope that helps.

--Ryan


On Jul 4, 2008, at 9:05 AM, Mark Boyd wrote:

I’m working on performing some integration with ldap using xdmp:http- get and have run across what appears to be a bug. I’ve attached an xqy file that runs standalone and doesn’t require any database or external connectivity and yet still exhibits the bug. When I hit this xqy file in my mark logic app server root directory on my local machine it generates the following table output in the browser:
1
code
200
message
OK
content-type
text/xml; charset=iso-8859-1
length
72
server
server
resp:server
server
<server xmlns="xdmp:http">Jetty(6.1.7)</server>
server
Jetty(6.1.7)

Note that there are four rows attempting to show various approaches for acquiring “server” information out of the xml generated within the xqy file with this statement:

  let $i := <html><body><response xmlns="xdmp:http">
      <code>200</code>
      <message>OK</message>
      <headers>
    <content-type>text/xml; charset=iso-8859-1</content-type>
    <content-length>72</content-length>
    <server>Jetty(6.1.7)</server>

      </headers>
</response><div iz="12" xmlns="http://www.w3.org/1999/ xhtml"><h1>Hello</h1></div></body></html>

How I came to this xml for the value of $i is using xdmp:quote() on the results of an xdmp:http-get call which is currently commented out. Everything after the closing </response> tag is returned from a jetty handler that was being hit by this xqy originally. But I could never obtain the value of the server element with this xqy file without a huge effort to determine what was going on. As you can see, using ‘{$i//resp:server}’ with ‘declare namespace resp = “xdmp:http” ‘ doesn’t work even though the third row for server does indeed show that resp is the prefix for the proper namespace.

So is this a bug? I’m running 3.2-6 standard edition with the community license.

Thanks.

Mark

NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
<ldapTest.xqy>_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to